Skip to content

Connect Azure Repos🔗

Lightrun reads the code in your Azure Repos repositories, such as SAP UI5 and Fiori apps, CAP services or integration scripts. It uses that code to connect a ticket to the code behind it. Access is read-only, and Lightrun never changes your code.

Azure Repos connects from the Code Repositories page in Lightrun, not from Connectors. You can sign in with a Personal Access Token (PAT) or with OAuth.

Method Best for What you create
Personal Access Token (PAT) Repositories in one Azure DevOps organization A PAT with Code (Read), scoped to that organization
OAuth Repositories spread across several organizations Nothing ahead of time. You sign in with Microsoft Entra ID and approve read access.

Who does it: an Azure DevOps admin, or a user who can read the repositories, with a Lightrun admin.

Prerequisites🔗

  • Azure DevOps Services (https://dev.azure.com/<organization>). Azure DevOps Server (on-premises) and legacy <organization>.visualstudio.com addresses aren't supported.
  • An Azure DevOps user who can read the repositories Lightrun should use. A dedicated service account is best.
  • For a PAT: your organization's policies allow PATs scoped to one organization, with Code (Read). See Microsoft's PAT policies for administrators.
  • For OAuth: your Entra ID tenant lets users consent to the Lightrun app, or an admin approves it.
  • A Lightrun user who can manage repositories, with permission to manage git repositories.
  • No other git provider connected in Lightrun. Lightrun uses one git provider per company. Disconnect GitHub or Bitbucket first if one is connected.
  • HTTPS access from Lightrun to Azure DevOps. See Step 3: Network.

Step 1: Create a PAT in Azure DevOps🔗

Skip this step if you use OAuth.

  1. Sign in to https://dev.azure.com/<organization> as the user Lightrun should act as.
  2. Open User settings → Personal access tokens and click New Token.
  3. Fill in:
    • Name: for example Lightrun
    • Organization: the one organization that holds your repositories
    • Expiration: a date your rotation plan covers, for example 30–60 days
    • Scopes: Custom defined, then Code → Read
  4. Click Create and copy the token.

Use a PAT for one organization

Lightrun doesn't support PATs set to All accessible organizations. Azure DevOps retires these global PATs on January 27, 2027. For repositories in several organizations, connect with OAuth instead.

Warning

The token is shown only once. Treat it like a password.

Step 2: Connect in Lightrun🔗

  1. In Lightrun, open Code Repositories. If no git provider is connected, the page shows Let's connect your code repositories.
  2. Click the Azure tile, then choose Personal Access Token (PAT) or OAuth.

With a Personal Access Token🔗

  1. Enter the Azure DevOps organization: the organization name, for example contoso. You can also paste https://dev.azure.com/contoso.
  2. Paste the token from step 1 into Azure Personal Access Token (PAT).
  3. Click Save. Lightrun checks the token against the organization before it saves it.

With OAuth🔗

  1. Sign in with your Microsoft account.
  2. Approve the requested access: read-only access to code, projects and your profile.
  3. Lightrun finds the organizations your account can access.

Select repositories🔗

  1. Click Add Repositories.
  2. Select the repositories Lightrun should use.

To change the method later, open Authentication at the top of the Code Repositories page. It shows Azure once connected.

Step 3: Network🔗

Nothing to open on your side for Azure DevOps Services. Lightrun connects over HTTPS to:

Host Used for
dev.azure.com Validating the token, listing repositories and cloning the selected repositories (read-only)
app.vssps.visualstudio.com Finding your organizations (OAuth)
login.microsoftonline.com Signing in (OAuth)
almsearch.dev.azure.com, vssps.dev.azure.com Code and commit search, and identities

If your organization restricts access with Microsoft Entra Conditional Access or an IP allowlist, allowlist Lightrun's IP addresses.

Check it works🔗

  1. After you save, the repository list loads with the repositories your token or account can read.
  2. Add one repository you know well.
  3. Ask Lightrun a question about that code, for example "Where is the purchase order approval check implemented?" Check that the answer links to the right files.

Troubleshooting🔗

What you see What to check
"Enter the organization name, e.g. contoso, or https://dev.azure.com/contoso" Enter just the organization name, or a https://dev.azure.com/ URL. <organization>.visualstudio.com addresses aren't accepted.
"Azure DevOps organization "…" not found" The organization name is misspelled, or it isn't on Azure DevOps Services.
"… the token was not accepted" or "authorization failed" The PAT has expired, is scoped to another organization, or lacks Code (Read). Create a new PAT for the right organization.
"Company already has … git integration configured" Another git provider is connected. Disconnect it from Authentication on the Code Repositories page, then connect Azure.
A repository is missing from the list The user behind the token can't read it, or it's in another organization. Use OAuth for several organizations.
The page shows Reconnect The token or OAuth sign-in has expired. Reconnect with a new PAT or sign in again.

Last update: November 24, 2026