> For the complete documentation index, see [llms.txt](https://docs.nullify.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nullify.ai/enterprise-tier/azure-install.md).

# Azure DevOps Install

## Creating the Azure App

1. **Sign in to Azure Portal:**
   * Go to [Azure Portal](https://portal.azure.com/).
   * Sign in with your Azure account credentials.
2. **Register a New Application:**
   * In the Azure Portal, select **App registrations**.
   * Click on the **+ New registration** button at the top of the App registrations page.
3. **Enter Application Details:**
   * **Name:** Enter a name for your application ("Nullify").
   * **Supported Account Types:** Choose the option for who can use the application:
     * Accounts in this organizational directory only (single tenant)
4. **Register the Application:**
   * Click **Register** to create the application. This action will register the application with Azure and generate a unique Application (client) ID and Directory (tenant) ID.
   * Record the `client_id` and `tenant_id`.
5. **Create Client Secret:**
   * In the left-hand menu of your app's registration page, select **Certificates & secrets**.
   * Under **Client secrets**, click on **New client secret**.
   * Provide a description for the secret (e.g., "Nullify App") and select an expiration period (e.g., 6 months, 12 months, 24 months).
   * Click **Add**.
   * After creating the client secret, it will be displayed only once. Make sure to copy and securely store this value immediately. This is your `client_secret`. Make sure you copied the secret value and not the secret id.
6. **Configure API Permissions:**
   * Nullify authenticates to Azure DevOps with the **client credentials** flow (using the Client ID, Client Secret, and Tenant ID you provide below). It requests the application-level Azure DevOps scope `499b84ac-1321-427f-aa17-267ca6975798/.default`, which represents the full Azure DevOps API surface. There are no delegated user permissions to configure.
   * Go to **API Permissions** in the left menu.
   * Click **+ Add a permission** and select **APIs my organization uses**.
   * Search for and select **Azure DevOps**.
   * Choose **Application permissions** and add `user_impersonation`, then click **Add permissions**.
   * Grant admin consent for Default Directory
7. **Authentication**
   * In the left menu, click on **Authentication**.
   * Under Platform configurations click \`\`+ Add a platform\` and choose **Web** application.
   * Under Web Redirect URIs, add the following: `https://your-company.auth.ap-southeast-2.amazoncognito.com/oauth2/idpresponse` (we will provide you with this).
8. **Provide Credentials to Nullify**

Please provide Nullify with the following credentials to complete your installation:

* **Client ID**
* **Client Secret**
* **Tenant ID**

## Add the Nullify App to your DevOps Organization

1. **Add Nullify as a User:**
   * Go to your Azure DevOps organization.
   * Navigate to **Organization settings**.
   * Select **Users** from the left-hand menu.
   * Click on **Add users**.
   * In the search box, type "Nullify" and select the Nullify service principal.
   * Set the **Access Level** to **Basic**.
   * Note: If you encounter an error saying "can't be added at this time," keep trying as it may be a temporary glitch.

## Configure Webhooks for Azure DevOps

The Nullify Dashboard can create all the necessary webhooks needed. You can do this across the whole organization or at the repository level. You can also create the webhooks manually.

### Automatic webhook creation

1. **Give Nullify permissions to create webhooks** Add the Nullify Service Principal User as an Administrator to your Azure DevOps organization. (This can be temporary until after the webhooks are created.)
   * Go to the **Project Settings** of the project you want to create webhooks for.
   * Navigate to **Permissions**.
   * Add the Nullify service principal to the **Project Collection Administrators** group.
2. **Create webhooks via the Nullify dashboard**

* Log in to your Nullify dashboard (<https://app.your-company.nullify.ai>)
* Option 1: Creating webhooks across the organization.
  * Go to the **Configure** tab and under the Info menu, click on **Initialize Azure Webhooks**.
* Option 2: Creating webhooks per repo
  * Go to the **Configure** tab and under the **Repositories** menu, you will see a list of repositories with the column **Is Initialized?**
  * This column indicates whether webhooks have been configured for that repository.
  * Click on the **Initialize** button to create webhooks.

3. You may now remove administrator privilages for Nullify from the DevOps organization.

### Manual webhook creation

1. **Create a Service Hook Subscription:**
   * Go to your Azure DevOps organization.
   * Navigate to the project where you want to configure the webhook.
   * Select **Project Settings** from the bottom left corner.
   * Under **General**, select **Service hooks**.
   * Click on **+ Create subscription**.
2. **Select the Service:**
   * In the list of services, select **Web Hooks**.
   * Click **Next**.
3. **Configure the Trigger:**
   * Choose the following events that will trigger the webhook: Code Pushed, Pull request commented on, Pull Request created, Pull Request updated, Work item updated. Azure only allows one event to be selected at a time so you will need to do steps 1-4 for each event type.
   * Click **Next**.
4. **Configure the Action:**
   * Enter the **URL** of the webhook endpoint provided by Nullify.
   * The URL is of the form `https://api.<your-organization>.nullify.ai/core/azure/webhook`
   * Basic authentication username is `nullify`.
   * Basic authentication password is the webhook shared secret provided to you by Nullify.
   * Click **Finish** to create the webhook subscription.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nullify.ai/enterprise-tier/azure-install.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
