Skip to main content
This guide is for self-hosted Azure DevOps Server. For an organization at dev.azure.com, use the cloud connection guide.

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 to confirm the network requirements before continuing.

Connect your collection

1

Sign in to CodeAnt AI

Open the CodeAnt AI dashboard. 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: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 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: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
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 to choose the scans and files to include. For automatic PR reviews, complete the service hook setup. Connecting repositories to the dashboard does not replace that setup.

Troubleshooting

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.
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.
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 with the collection, project, and repository name. Do not include the PAT.
Complete the pull request review setup for the project, including both service hook subscriptions. Then open a new PR or post @codeant-ai: review on an existing PR.

Next steps

Enable pull request reviews

Configure service hooks and verify your first review.

Configure repository scans

Choose which analyses run and which files they include.