# Azure DevOps

The Appmixer Azure DevOps connector uses Microsoft Entra ID (Azure AD) OAuth 2.0 for authentication. You need to register an application in the Azure portal.

## 1. Register an Application in Azure Portal

Go to the [Azure portal - App registrations](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) and click **+ New registration**.

* **Name**: A name for your application (e.g. "Appmixer Azure DevOps").
* **Supported account types**: Select **Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant)**.
* **Redirect URI**: Select **Web** and set it to your Appmixer callback URL, e.g. `https://api.YOUR_SUBDOMAIN.appmixer.cloud/auth/azuredevops/callback`.

Click **Register**.

## 2. Get Application (Client) ID

After registration, you will be taken to the app's **Overview** page. Copy the **Application (client) ID** - this is your `clientId`.

## 3. Create a Client Secret

1. In the left menu, go to **Certificates & secrets**.
2. Click **+ New client secret**.
3. Add a description and select an expiration period (use the longest available).
4. Click **Add**.
5. Copy the **Value** of the newly created secret immediately - this is your `clientSecret`. It will not be shown again.

## 4. Configure API Permissions

1. In the left menu, go to **API permissions**.
2. Click **+ Add a permission**.
3. Select **Azure DevOps**.
4. Select **Delegated permissions**.
5. Check **user\_impersonation**.
6. Click **Add permissions**.

The final set of permissions should include:

| Permission           | Type      | Description                |
| -------------------- | --------- | -------------------------- |
| `user_impersonation` | Delegated | Azure DevOps - Full access |

## 5. Configure Appmixer Backoffice

Go to the **Connector Configuration** section in the Appmixer Backoffice. Find or add the `appmixer:azuredevops` connector and set the following values:

* **clientId**: The `Application (client) ID` from the Azure portal.
* **clientSecret**: The `Client Secret Value` from the Azure portal.
