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

# Control Center

> Connect your Azure DevOps Server collection and verify that its repositories appear in CodeAnt AI.

> [!NOTE]
>
> This guide is for self-hosted Azure DevOps Server. For an organization at `dev.azure.com`, use the [cloud connection guide](https://docs.codeant.ai/setup/azure_devops/cloud/control_center.md).

## Before you begin

* A company email address you can use to sign in to CodeAnt AI and receive a verification code. Public email addresses such as Gmail or Yahoo are not supported by this sign-in flow.
* An Azure DevOps Server account with access to the projects and repositories you want to analyze.
* Permission to create a PAT under your organization's policy.
* The server base URL and collection name from your repository URL.

CodeAnt must be able to reach your server to fetch repositories and analysis data. If the server is private, [contact CodeAnt support](mailto:support@codeant.ai) to confirm the network requirements before continuing.

## Connect your collection

**1. Sign in to CodeAnt AI**

Open the [CodeAnt AI dashboard](https://app.codeant.ai). Select **Self-Hosted**, then **Sign in with SSO**.

Enter your company email address, then enter the verification code sent to your inbox.

**2. Create a personal access token**

In Azure DevOps Server, open **User settings** → **Personal access tokens** and select **+ New Token**.

Name the token `CodeAnt AI`, select the intended organization or collection, and choose an expiry date permitted by your organization's policy. Select the scopes for the features you plan to use:

| Scope | Access | Used for |
| - | - | - |
| Code | Read & write | Repository access and analysis |
| Pull Request Threads | Read & write | Review comments and threads |
| Build | Read | DORA metrics |
| Work Items | Read & write | Metrics and ticket creation |

**Code** and **Pull Request Threads** are the scopes for scans and reviews. Add **Build** for DORA metrics and **Work Items** for work item data and Azure DevOps ticket creation.

Select **Create** and copy the token before closing the page. See [Microsoft's PAT guide](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops) for token creation requirements.

**3. Enter your connection details**

Separate the server base URL from the collection name. Do not include the project or repository path in either field.

For a repository such as `https://ado.example.com/DefaultCollection/my-project/_git/my-repository`, enter:

| Field | Value |
| - | - |
| Base URL | `https://ado.example.com` |
| Organization or collection name | `DefaultCollection` |
| Access token | The PAT you just created |

If your server URL has a deployment path, keep that path in the base URL. For example, `https://ado.example.com/tfs/DefaultCollection/my-project/_git/my-repository` uses `https://ado.example.com/tfs` as the base URL and `DefaultCollection` as the collection name.

![CodeAnt connection form for a self-hosted Azure DevOps server](https://mintcdn.com/codeantai/cPAPWnajTUNzakyT/images/setup/azure-devops/self-hosted/control_center/form-data.png?fit=max\&auto=format\&n=cPAPWnajTUNzakyT\&q=85\&s=37941b50cdfc4bab8b5f4edbaec07bc4)

**4. Save the connection**

Review the values and select **Submit**. CodeAnt fetches the projects and repositories available to the token's account.

## Verify repository access

Confirm that a repository you expect appears in CodeAnt AI. If it is missing, check the token account's access to that project and repository before configuring analysis.

Use [repository analysis configuration](https://docs.codeant.ai/repositories/analysis_configuration.md) to choose the scans and files to include.

For automatic PR reviews, complete the [service hook setup](https://docs.codeant.ai/setup/azure_devops/self-hosted/pull_request.md). Connecting repositories to the dashboard does not replace that setup.

## Troubleshooting

> [accordion] I have not received my sign-in code
>
> Confirm that you entered your company email correctly. Check your spam, junk, and quarantine folders. If the code is still missing, ask your email administrator to check delivery or [contact CodeAnt support](mailto:support@codeant.ai).

> [accordion] The connection fails when I submit the form
>
> Compare the base URL and collection name with the examples above. Confirm that the PAT has not expired or been revoked and belongs to an account with access to the intended projects. Confirm that CodeAnt can reach the server; a successful login from your browser does not verify that network path.

> [accordion] My repository is missing
>
> Check that the PAT covers the intended organization or collection and that its owner has repository access. A PAT cannot grant more access than its owner has. If the repository remains missing, [contact CodeAnt support](mailto:support@codeant.ai) with the collection, project, and repository name. Do not include the PAT.

> [accordion] Repositories appear, but pull requests are not reviewed
>
> Complete the [pull request review setup](https://docs.codeant.ai/setup/azure_devops/self-hosted/pull_request.md) for the project, including both service hook subscriptions. Then open a new PR or post `@codeant-ai: review` on an existing PR.

## Next steps

> [card] [Enable pull request reviews](https://docs.codeant.ai/setup/azure_devops/self-hosted/pull_request.md)
>
> Configure service hooks and verify your first review.

> [card] [Configure repository scans](https://docs.codeant.ai/repositories/analysis_configuration.md)
>
> Choose which analyses run and which files they include.


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