> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opal.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure DevOps

> Connect Opal to your Azure DevOps organization to manage and review access to projects, repositories, pipelines, and service connections.

Opal's integration with Azure DevOps lets you review and manage access to your Azure DevOps organization, including its groups, licenses, projects, repositories, pipelines, and service connections.

With the Azure DevOps integration, you can:

* View every user in your Azure DevOps organization and the access they hold
* Grant and revoke membership in organization and project groups
* Grant and revoke Git repository, pipeline, and service connection permissions
* Optionally grant and revoke Azure DevOps licenses
* Review the service principals that can act in your organization

> [!NOTE]
>
> This integration supports Azure DevOps Services (`dev.azure.com`). Azure DevOps Server (on-premises) is not supported. To manage Microsoft Entra ID users and groups, use the [Azure integration](https://docs.opal.dev/integrations/azure.md).

## Supported resources

| Resource | Read | Grant and revoke access |
| - | - | - |
| Organization | ✔️ | ✔️ |
| Project | ✔️ | ✔️ |
| Repository | ✔️ | ✔️ |
| Pipeline | ✔️ | ✔️ |
| Service connection | ✔️ | ✔️ |
| Service principal | ✔️ | |

Repositories, pipelines, and service connections are children of their project. Service principals are shown for visibility only. They have no roles and can't be requested or granted. A service principal's page is available in Opal, but it isn't listed with your app's assets.

## Supported roles

Each resource type has its own roles. Opal reads them from Azure DevOps, so any custom group you create there is available too.

| Resource | Roles |
| - | - |
| Organization | The organization-level groups, such as **Project Collection Administrators** and **Project Collection Build Administrators**, and the licenses **Stakeholder**, **Basic**, and **Basic + Test Plans** |
| Project | The project's security groups and teams, such as **Contributors**, **Readers**, and **Project Administrators** |
| Repository | **Reader**, **Contributor**, and **Administrator** |
| Pipeline | **Viewer**, **Runner**, **Editor**, and **Administrator** |
| Service connection | **Reader**, **User**, and **Administrator** |

The roles of a repository, pipeline, or service connection build on each other, so each one includes the permissions of the roles before it.

## How access syncs

* **Users.** Opal imports the people in your Azure DevOps organization and matches them to Opal users by email. Opal skips users without an email address, users whose license is disabled or deleted, and service principals.
* **Groups.** A user who belongs to a group through a nested group, or through a Microsoft Entra group, is shown with that group's role.
* **Repositories and pipelines.** Opal shows the permissions assigned directly to each user, not permissions inherited through a group.
* **Service connections.** Opal shows roles assigned directly to a user. Opal never reads or changes the secret inside a service connection.
* **Licenses.** Opal reads every user's license on each sync. Licenses you manage outside Azure DevOps, such as a Visual Studio subscription, are shown but can't be granted from Opal.

Every sync is a full sync.

## Requirements

Before you begin, you must:

* Be an Opal Admin
* Be able to register an app in your Microsoft Entra tenant
* Be able to add users in your Azure DevOps organization, which requires Project Collection Administrator access
* Be on version `1.1266.0` or later, if you self-host Opal

## 1. Register an app in Microsoft Entra

Opal signs in to Azure DevOps as a Microsoft Entra app registration.

1. In the [Microsoft Entra admin center](https://entra.microsoft.com), go to **Entra ID** > **App registrations** and select **New registration**.
2. Name the app, for example **Opal**, and register it.
3. On the app's **Overview** page, copy the **Directory (tenant) ID** and the **Application (client) ID**.
4. Go to **Certificates & secrets** and select **New client secret**. Copy the secret **Value**. You can't view it again after you leave the page.

## 2. Add the app to your Azure DevOps organization

An app registration can't call Azure DevOps until it's a member of your organization.

1. In Azure DevOps, go to **Organization settings** > **Users** and select **Add users**.
2. Search for the app by name and add it with a **Basic** or **Stakeholder** license.
3. Give the app the permissions that match how you plan to use Opal:

| You want to | Add the app to |
| - | - |
| Sync and review access only | The **Contributors** group of each project you want to sync |
| Also grant and revoke access | The **Project Collection Administrators** group. This covers every project, the organization's groups, and license changes |

> [!WARNING]
>
> If you add the app to **Contributors** only, Opal can read access but can't change it. Grant and revoke requests fail until you give the app administrator permissions.

## 3. Create the Azure DevOps app in Opal

In Opal, go to **Inventory** > **+App** and select **Azure DevOps**.

Name the app, select an **App admin**, provide a description, and enter the following:

* **Organization**: the name of your organization, which is the `{organization}` in `dev.azure.com/{organization}`
* **Directory (tenant) ID**, **Application (client) ID**, and **Client secret**: the values from step 1

Select **Manage licenses** if you want Opal to grant and revoke Azure DevOps licenses. This is off by default because Basic licenses are paid, so a license change is a billing action. Opal reads licenses whether or not this is on. You can change this setting later by editing the app.

Opal validates the connection when you save. The validation checks that Opal can read your organization's users and projects, and shows a separate result for the groups, repository permissions, pipeline permissions, and service connections it needs to read. If one of those fails, the message names the missing permission. Opal also shows a **Can grant and revoke access** result that warns you if the app doesn't have the permissions to manage Git and pipeline permissions.

After you save the app, import your Azure DevOps resources from the app's **Assets** tab by selecting **Import assets**.

## Grant and revoke access

Once you've imported resources, you can [configure them](https://docs.opal.dev/docs/import-and-configure-resources-and-groups.md), add them to your [catalog](https://docs.opal.dev/docs/curate-catalog.md), add users directly, and include them in access reviews like any other Opal resource.

### Groups and licenses

* Granting a group role adds the user to that group in Azure DevOps. Revoking it removes the user.
* With **Manage licenses** on, granting a license sets the user's Azure DevOps license to that tier. Revoking a license moves the user to **Stakeholder**, the free tier. Opal doesn't remove users from your organization.
* With **Manage licenses** off, license grants and revokes fail with a message that names the setting.

### Repositories, pipelines, and service connections

* Granting a repository or pipeline role sets the user's permissions to exactly that role. Permissions outside the role ladder and any explicit deny are left as they are. If a permission the role needs is explicitly denied for the user, the grant fails and says which one.
* Granting a service connection role gives the user that role, replacing any role they held on that connection.
* A user with a **Stakeholder** license can't use Repos in a private project. Opal doesn't check this before it grants repository access, so the permission takes effect after the user has a **Basic** license.

## Limitations

* **Entra groups.** Opal shows the members of Microsoft Entra groups in your organization, but can't change them, because Entra owns their membership. A grant or revoke for one of these groups fails with a message to change the group in Entra.
* **Nested groups.** Azure DevOps removes only direct group members. If a user holds a role through a nested group, revoking it from Opal fails and names the nested group to change, rather than reporting success while the access stays.
* **Enterprise-level groups.** Groups such as **Enterprise Invited Users** are listed as organization roles, but Azure DevOps may not let Opal change them.
* **Group-held permissions.** Repository, pipeline, and service connection permissions held by a group aren't attributed to the group's members.
* **Account provisioning.** Opal can't invite a person to your Azure DevOps organization. People must already be members.
* **Personal access tokens.** Opal doesn't inventory personal access tokens.
* **Not supported.** Variable groups, secure files, environments, agent pools, Artifacts feeds, classic release pipelines, and audit log events.

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.