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

# Azure DevOps Server setup

> Connect Azure DevOps Server to CodeRabbit Cloud through an Enterprise SSO workspace, add collections, and install pull request reviews.

export const EnterprisePlanBadge = ({tip = "This feature is available exclusively as part of the Enterprise plan. Please refer to our pricing page for more information about our plans and features.", title = "Enterprise Plan", cta = "Read more", href = "https://coderabbit.ai/pricing", disabled = false}) => {
  return <Tooltip tip={tip} cta={cta} href={href}>
        <Badge icon="building-2" disabled={disabled || undefined}>
            {title}
        </Badge>
    </Tooltip>;
};

export const AdminRoleBadge = ({tip = "This feature requires an organization owner, an admin role or the corresponding permission. Regular Members do not have access.", title = "Admin Only", cta = "View roles", href = "/management/roles", disabled = false}) => {
  return <Tooltip tip={tip} cta={cta} href={href}>
        <Badge icon="lock" color="orange" disabled={disabled || undefined}>
            {title}
        </Badge>
    </Tooltip>;
};

<EnterprisePlanBadge />

<AdminRoleBadge tip="Registering a server and managing its bot token require a CodeRabbit workspace admin." />

Connect your Azure DevOps Server instance to CodeRabbit Cloud to review pull requests in your repositories. Users sign in to CodeRabbit through Enterprise SSO, then link their Azure DevOps Server account with a personal access token (PAT). A separate bot PAT lets CodeRabbit post reviews and comments.

Complete [Enterprise SSO setup](/management/sso) before following this guide. Azure DevOps Server uses PATs for this connection; there is no CodeRabbit OAuth application or callback URL to configure on the server.

## Before you start

Have the following ready:

* An Enterprise SSO workspace and a CodeRabbit workspace admin who can register the server.
* The server's HTTPS base URL, including its installation path if it has one, such as `https://ado.example.com/tfs`.
* The collections, projects, and repositories you want to connect.
* A dedicated Azure DevOps Server user for CodeRabbit, with access to every collection and repository it will review.
* A PAT for that bot user and a separate PAT for the person completing setup.

Confirm your Azure DevOps Server version and network requirements with your CodeRabbit account team before onboarding.

### Network access

CodeRabbit must be able to reach the server for authenticated API requests and Git access. Azure DevOps Server must also be able to deliver service hooks to CodeRabbit.

For a direct connection, use a publicly reachable HTTPS server URL. If users access a different address, the registration form accepts an **Alternate host URL (optional)** for CodeRabbit's server-to-server requests. Both addresses must route to the same Azure DevOps Server. Preserve an installation path such as `/tfs` in the alternate address when applicable.

If the server is reachable only on a private network, contact [CodeRabbit support](/support) to arrange private access before registering it. Entering a private address alone does not establish connectivity. Ask your account team for the network requirements for your CodeRabbit region.

### Prepare the two tokens

In Azure DevOps Server, open **User settings** > **Personal access tokens** and create a token while signed in as each account. Choose an expiration date and save each token securely when it is shown.

| Token | Used for | Access to prepare |
| - | - | - |
| Bot PAT | CodeRabbit reviews and comments | Identity read, project read, and Code read/write scopes. The bot user needs **Read** and **Contribute to pull requests** permissions on each repository and access to every connected collection. |
| Your personal PAT | Linking your account, discovering collections and repositories, and installing service hooks | Identity read, project read, and Code read scopes. The person installing repositories also needs service-hook read/manage access in the target projects. |

PAT scopes and the account's permissions both apply. A token does not grant access to a project or repository that its owner cannot access. Keep the bot account separate from the people who open pull requests.

## Register the server

<Steps>
  <Step title="Open Azure DevOps Server onboarding">
    Sign in to the [CodeRabbit application](https://app.coderabbit.ai) through your organization's SSO. In your workspace, open **Git provider onboarding** and select **Azure DevOps Server**. You can also select this provider during initial workspace onboarding.
  </Step>

  <Step title="Enter the server address">
    Select **Add server** if the workspace already has a registered server. Enter the **Server URL** without a collection, project, or repository path. Include the server installation path when applicable.

    For example, if a collection is at `https://ado.example.com/tfs/DefaultCollection`, enter `https://ado.example.com/tfs`.

    Use HTTPS and omit credentials, query parameters, and URL fragments. If your network setup requires a separate reachable address, enter it in **Alternate host URL (optional)**. Otherwise, leave that field empty.
  </Step>

  <Step title="Register the bot account">
    Paste the dedicated bot user's PAT into **Bot personal access token** and select **Register server**. CodeRabbit verifies the bot identity and saves the server connection.

    If the server is already listed under **Registered servers**, select **Continue with** its URL instead of registering it again.
  </Step>
</Steps>

## Connect your account and collections

<Steps>
  <Step title="Link your own Azure DevOps Server account">
    Enter your own PAT in **Your personal access token** and select **Connect account**. Use your individual account's token here. It determines which collections, projects, and repositories you can see.
  </Step>

  <Step title="Add collections to the workspace">
    Select the collections you want to add from the onboarding flow or the **Add collections** dialog in **Git provider onboarding**. Each collection becomes an organization in your CodeRabbit workspace.

    Only collections accessible to your linked account are available. Check that the bot account can access the selected collections as well.
  </Step>

  <Step title="Connect other team members">
    Team members sign in through SSO, select the registered server, and connect their own personal PAT. SSO workspace membership does not grant Azure DevOps Server repository access.

    Configure review seats using the separate [workspace seat assignment guide](/management/seat-assignment#enterprise-sso-workspaces).
  </Step>
</Steps>

## Install repositories and verify a review

<Steps>
  <Step title="Select a collection and project">
    Switch to the collection's organization in CodeRabbit and open **Repositories**. Select the **Project** containing the repository. Use **Load more projects** or **Load more repositories** if needed.
  </Step>

  <Step title="Install CodeRabbit">
    Select **Install** beside a repository and wait for **Installed** to appear. Your CodeRabbit role must allow repository management.

    CodeRabbit checks your personal repository access and the bot account's repository permissions, then creates and verifies the review service hooks using your personal PAT. The bot token is used to perform reviews.
  </Step>

  <Step title="Verify service-hook delivery">
    In the Azure DevOps Server project's **Service hooks** settings, confirm that the CodeRabbit review subscriptions are enabled. Check their delivery history after opening or updating a pull request. Use the subscriptions created by CodeRabbit, which contain the Server-specific callback and authentication settings.
  </Step>

  <Step title="Open a test pull request">
    Use a human account to open a non-draft pull request with a code change against the repository's default branch. Confirm that CodeRabbit posts a review under the bot account. If your repository has custom review settings, check that automatic reviews are enabled for this pull request.
  </Step>
</Steps>

## Maintain the connection

Before the bot PAT expires, create a replacement for the **same bot account** with access to every connected collection. As a workspace admin, open **Git credentials**, select **Azure DevOps Server**, find the server, paste the new **Bot personal access token**, and select **Update bot token**. Verify a review after rotation; saving the token does not establish that every repository permission or write scope is correct.

If your personal PAT expires or your access changes, reconnect your account through **Git provider onboarding** with a valid personal PAT. Updating the bot token does not update team members' personal tokens.

## Troubleshooting

| Symptom | What to check |
| - | - |
| Azure DevOps Server is unavailable in onboarding | Ask your CodeRabbit account team to check the workspace's Server availability and your SSO access. |
| Registration rejects the server URL | Use the HTTPS server root, retaining any installation path and removing the collection or project suffix. For private or restricted addresses, arrange connectivity with CodeRabbit support. |
| The bot PAT is rejected | Check its expiration, the bot account, token scopes, and the server's PAT authentication configuration. |
| Collections, projects, or repositories are missing | Check your personal PAT and your Azure DevOps Server account's access. The bot account's access does not expand your own visibility. |
| Repository installation fails | Check your CodeRabbit repository-management permission, personal repository read and service-hook permissions, and the bot account's **Read** and **Contribute to pull requests** permissions. |
| The repository is installed but no review appears | Check service-hook delivery history, bot PAT validity, review seats, and automatic review settings. Use a human-authored, non-draft pull request for the test. |
| Bot token rotation fails | Use a token for the registered bot account with access to all connected collections. Reload if the server or collection list changed during validation. |

If setup still fails, contact [support](/support) with the failing step, error message, and time of the attempt. Do not include PATs or service-hook secrets.

## What's next

<CardGroup cols={1}>
  <Card title="Configure reviews" href="/getting-started/yaml-configuration" icon="settings" horizontal>
    Customize review behavior with a repository configuration file.
  </Card>

  <Card title="Seat assignment" href="/management/seat-assignment#enterprise-sso-workspaces" icon="users" horizontal>
    Choose how workspace members receive review seats.
  </Card>
</CardGroup>


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