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

# Set up a Microsoft Azure DevOps connector

> C1 provides identity governance and just-in-time provisioning for Microsoft Azure DevOps. Integrate your Azure DevOps instance with C1 to run user access reviews (UARs) and enable just-in-time access requests.

## Capabilities

| Resource           | Sync                                                          | Provision                                                     |
| :----------------- | :------------------------------------------------------------ | :------------------------------------------------------------ |
| Accounts           | <Icon icon="square-check" iconType="solid" color="#c937ae" /> | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |
| Service accounts   | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |                                                               |
| Service principals | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |                                                               |
| Projects           | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |                                                               |
| Groups             | <Icon icon="square-check" iconType="solid" color="#c937ae" /> | <Icon icon="square-check" iconType="solid" color="#c937ae" /> |

The Azure DevOps connector supports [automatic account provisioning](/product/admin/account-provisioning).

This connector does not support account deprovisioning. You must deprovision accounts directly in Azure DevOps.

Some Azure DevOps groups are managed in Microsoft Entra (formerly Azure AD),
not in Azure DevOps. These groups appear in Azure DevOps and their members are
visible, but membership changes are made in Entra.

For Entra-managed groups, the connector accepts add and remove requests and
reports them as successful without changing membership in Azure DevOps or
Entra. These groups are assumed to be managed elsewhere — in the Entra admin
center, through another C1 connector that integrates with Entra, or by another
process. Reporting requests as successful prevents access reviews and
just-in-time access requests from stalling on changes the connector does not
perform.

To have C1 manage Entra group membership through this connector, enable
**Entra group membership provisioning** during setup. Requirements:

* OAuth authentication. Personal Access Tokens do not support changes to
  Entra group membership.
* The `GroupMember.ReadWrite.All` permission on the Entra app registration,
  with admin consent in the tenant.

See [Configure the Azure DevOps connector](#configure-the-azure-devops-connector) below for setup steps.

## Gather Azure DevOps credentials

Configuring the connector requires you to pass in credentials generated in Azure DevOps. Gather these credentials before you move on.

<Warning>
  A user with **Project Collection Administrator** role at the organization level and **Project Administrator** role at the project level must perform this task.
</Warning>

You can authenticate the Azure DevOps connector by registering a web app and signing in with OAuth, or by using a personal access token. Follow the relevant set of instructions below to create your preferred set of credentials.

### Option 1: Register a web application

<Steps>
  <Step>
    In Azure DevOps, navigate to **App registrations** and create a new app.
  </Step>

  <Step>
    Give the new app a name and select the **Accounts in any organizational directory** option.
  </Step>

  <Step>
    Enter `https://accounts.conductor.one/oauth/callback` as a **Web** redirect URI.
  </Step>

  <Step>
    Click **Register**.
  </Step>

  <Step>
    Carefully copy and save the application (client) ID.
  </Step>

  <Step>
    Click **Certificates & secrets** and create a new secret.
  </Step>

  <Step>
    Carefully copy and save the secret **Value** (not the secret ID).
  </Step>

  <Step>
    Finally, click **API permissions** and select **Azure DevOps**.
  </Step>

  <Step>
    Give the app the following permissions based on your needs:

    **For sync-only (read) access:**

    * user\_impersonation (required - Azure DevOps only allows delegated permissions)
    * vso.profile
    * vso.graph

    **For full provisioning (read/write) access:**

    * user\_impersonation (required - Azure DevOps only allows delegated permissions)
    * vso.profile
    * vso.graph\_manage
    * vso.memberentitlementmanagement\_write
  </Step>

  <Step>
    Click **Add permissions**.
  </Step>

  <Step>
    **Optional — only required for Entra group membership provisioning.**

    If you want C1 to grant and revoke memberships on Entra-sourced Azure DevOps
    groups (descriptor prefix `aadgp.`), grant this same Entra app the **Microsoft
    Graph** application permission **`GroupMember.ReadWrite.All`** with admin
    consent.

    In the Entra portal, on this app registration:

    1. Click **API permissions** > **Add a permission**.
    2. Choose **Microsoft Graph** (not Azure DevOps).
    3. Choose **Application permissions** (not Delegated).
    4. Select **`GroupMember.ReadWrite.All`** and click **Add permissions**.
    5. Click **Grant admin consent for \<tenant>** at the top of the
       permissions list.

    This is the least-privilege Microsoft Graph permission for member-only
    writes; the broader `Group.ReadWrite.All` is not required. Without it,
    Entra group membership provisioning will fail with a clear "missing
    GroupMember.ReadWrite.All" error at the first grant or revoke attempt.
  </Step>

  <Step>
    Carefully copy and save your **Azure tenant ID** and **organization URL**.
  </Step>
</Steps>

**Done.** Next, move on to the connector configuration instructions.

### Option 2: Create a personal access token

<Note>
  Personal Access Token authentication does **not** support Entra group
  membership provisioning. With PAT auth, grant and revoke requests against
  Entra-sourced groups (descriptor prefix `aadgp.`) are silent no-ops — the
  connector accepts the request and returns success without making any API
  call. If you need C1 to actually grant or revoke memberships on Entra-sourced
  Azure DevOps groups, configure the connector with OAuth
  ([Option 1](#option-1-register-a-web-application)) instead.
</Note>

<Steps>
  <Step>
    In Azure DevOps, navigate to your users settings (the person icon in the top menu bar) and select **personal access tokens**.
  </Step>

  <Step>
    Click **+ New Token**.
  </Step>

  <Step>
    Give the new token a name, such as "C1", then select the relevant organization and set an expiration date.
  </Step>

  <Step>
    Under **Scopes**, select **Custom defined** and set the relevant set of scopes:
    To give the connector READ (sync only) permissions:

    * **Graph: Read** - Enables all Graph API read operations (users, groups, service principals, memberships, storage keys, descriptors, subject queries)
    * **Project and Team: Read** - Enables all Core API read operations (projects, teams, team members)
      To give the connector READ/WRITE (sync and provision) permissions:
    * **Graph: Read & manage** - Enables all Graph API read and write operations (users, groups, service principals, memberships, storage keys, descriptors, subject queries)
    * **Member Entitlement Management: Read & write** - Enables all Entitlements API read and write operations (list, create, and update user entitlements and licenses)
    * **Project and Team: Read** - Enables all Core API read operations (projects, teams, team members)
      To enable incremental sync (optional):
    * **Audit Log: Read** - Required if you want to enable the incremental sync feature, which syncs only changes since the last sync
  </Step>

  <Step>
    Click **Create**.
  </Step>

  <Step>
    The new token is created. Carefully copy and save the token.
  </Step>
</Steps>

**Done.** Next, move on to the connector configuration instructions.

## Configure the Azure DevOps connector

<Warning>
  To complete this task, you'll need:

  * The **Connector Administrator** or **Super Administrator** role in C1
  * Access to the set of Azure DevOps credentials generated by following the instructions above
</Warning>

<Tabs>
  <Tab title="Cloud-hosted">
    **Follow these instructions to use a built-in, no-code connector hosted by C1.**

    <Steps>
      <Step>
        In C1, navigate to **Integrations** > **Connectors** and click **Add connector**.
      </Step>

      <Step>
        Search for **Azure DevOps** and click **Add**.
      </Step>

      <Step>
        Choose how to set up the new Azure DevOps connector:

        * Add the connector to a currently unmanaged app (select from the list of apps that were discovered in your identity, SSO, or federation provider that aren't yet managed with C1)
        * Add the connector to a managed app (select from the list of existing managed apps)
        * Create a new managed app
      </Step>

      <Step>
        Set the owner for this connector. You can manage the connector yourself, or choose someone else from the list of C1 users. Setting multiple owners is allowed.
        If you choose someone else, C1 will notify the new connector owner by email that their help is needed to complete the setup process.
      </Step>

      <Step>
        Click **Next**.
      </Step>

      <Step>
        Find the **Settings** area of the page and click **Edit**.
      </Step>

      <Step>
        Select your method of authenticating to Azure DevOps and click either **OAuth** or **Username and password**.
        If you chose **OAuth**:

        1. Enter your organization URL, Azure tenant ID, OAuth client ID, and OAuth client secret in the relevant fields.
        2. **Optional.** Check the boxes if you want to **Sync teams** or **Sync organizations**.
        3. **Optional.** Check **Enable incremental sync** to allow the connector to read audit logs and capture updates between full syncs. Requires the **Audit Log: Read** permission.
        4. **Optional.** Check **Enable Entra group membership provisioning** to grant and revoke memberships on Entra-sourced groups via Microsoft Graph. Requires the `GroupMember.ReadWrite.All` Microsoft Graph application permission with admin consent (see Step 9 of [Option 1](#option-1-register-a-web-application)). Per Microsoft, changes may take up to 1 hour to appear in the Azure DevOps Members view.
        5. Click **Save**.
        6. Click **Login with OAuth**.
        7. Log in and authorize C1 with your Azure DevOps instance.
        8. You will then be redirected back to the Azure DevOps setup page in C1, where you'll see an authorization message.
           If you chose **Personal access token**:
        9. Paste your Azure DevOps organization URL in the format `https://dev.azure.com/{Your_Organization}` into the **Organization URL** field.
        10. Paste the token into the **Personal Access Token** field.
        11. **Optional.** Check the boxes if you want to **Sync teams** or **Sync organizations**.
        12. **Optional.** Check **Enable incremental sync** to allow the connector to read audit logs and capture updates between full syncs. Requires the **Audit Log: Read** permission.
        13. Click **Save**.
      </Step>

      <Step>
        The connector's label changes to **Syncing**, followed by **Connected**. You can view the logs to ensure that information is syncing.
      </Step>
    </Steps>

    **Done.** Your Azure DevOps connector is now pulling access data into C1.
  </Tab>

  <Tab title="Self-hosted">
    **Follow these instructions to use the Azure DevOps connector, hosted and run in your own environment.**

    When running in service mode on Kubernetes, a self-hosted connector maintains an ongoing connection with C1, automatically syncing and uploading data at regular intervals. This data is immediately available in the C1 UI for access reviews and access requests.

    ### Resources

    * [Official download center](https://dist.conductorone.com/ConductorOne/baton-azure-devops): For stable binaries (Windows/Linux/macOS) and container images.

    ### Step 1: Set up a new Azure DevOps connector

    <Steps>
      <Step>
        In C1, navigate to **Integrations** > **Connectors** > **Add connector**.
      </Step>

      <Step>
        Search for **Baton** and click **Add**.
      </Step>

      <Step>
        Choose how to set up the new Azure DevOps connector:

        * Add the connector to a currently unmanaged app (select from the list of apps that were discovered in your identity, SSO, or federation provider that aren't yet managed with C1)
        * Add the connector to a managed app (select from the list of existing managed apps)
        * Create a new managed app
      </Step>

      <Step>
        Set the owner for this connector. You can manage the connector yourself, or choose someone else from the list of C1 users. Setting multiple owners is allowed.
        If you choose someone else, C1 will notify the new connector owner by email that their help is needed to complete the setup process.
      </Step>

      <Step>
        Click **Next**.
      </Step>

      <Step>
        In the **Settings** area of the page, click **Edit**.
      </Step>

      <Step>
        Click **Rotate** to generate a new Client ID and Secret.
        Carefully copy and save these credentials. We'll use them in Step 2.
      </Step>
    </Steps>

    ### Step 2: Create Kubernetes configuration files

    Create two Kubernetes manifest files for your Azure DevOps connector deployment:

    #### Secrets configuration

    ```yaml expandable theme={"theme":{"light":"css-variables","dark":"css-variables"}}
    # baton-azure-devops-secrets.yaml
    apiVersion: v1
    kind: Secret
    metadata:
      name: baton-azure-devops-secrets
    type: Opaque
    stringData:
      # C1 credentials
      BATON_CLIENT_ID: <C1 client ID>
      BATON_CLIENT_SECRET: <C1 client secret>
      
      # Azure DevOps credentials
      BATON_ORGANIZATION_URL: <Your Azure DevOps organization URL, formed like https://dev.azure.com/{Your_Organization}>
      BATON_PAT: <Azure DevOps personal access token>

      # Optional: include if you want C1 to provision access using this connector
      BATON_PROVISIONING: true

      # Optional: include if you want to sync grant sources
      BATON_SKIP_UNUSED_ROLES: true

      # Optional: include to read audit logs and capture updates between full syncs (requires Audit Log: Read permission)
      BATON_ENABLE_INCREMENTAL_SYNC: true

      # Optional: include to provision membership on Entra-sourced groups via Microsoft Graph.
      # Requires OAuth authentication (BATON_PAT-only deployments cannot use this)
      # AND the GroupMember.ReadWrite.All Microsoft Graph application permission
      # with admin consent on the Entra app registration. See the OAuth setup section above.
      BATON_ENABLE_ENTRA_GROUP_PROVISIONING: true
    ```

    See the connector's README or run `--help` to see all available configuration flags and environment variables.

    #### Deployment configuration

    ```yaml expandable theme={"theme":{"light":"css-variables","dark":"css-variables"}}
    # baton-azure-devops.yaml
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: baton-azure-devops
      labels:
        app: baton-azure-devops
    spec:
      selector:
        matchLabels:
          app: baton-azure-devops
      template:
        metadata:
          labels:
            app: baton-azure-devops
            baton: true
            baton-app: azure-devops
        spec:
          containers:
          - name: baton-azure-devops
            image: ghcr.io/conductorone/baton-azure-devops:latest
            imagePullPolicy: IfNotPresent
            env:
            - name: BATON_HOST_ID
              value: baton-azure-devops
            envFrom:
            - secretRef:
                name: baton-azure-devops-secrets
    ```

    ### Step 3: Deploy the connector

    <Steps>
      <Step>
        Create a namespace in which to run C1 connectors (if desired), then apply the secret config and deployment config files.
      </Step>

      <Step>
        Check that the connector data uploaded correctly. In C1, click **Apps**. On the **Managed apps** tab, locate and click the name of the application you added the Azure DevOps connector to. Azure DevOps data should be found on the **Entitlements** and **Accounts** tabs.
      </Step>
    </Steps>

    **Done.** Your Azure DevOps connector is now pulling access data into C1.
  </Tab>
</Tabs>
