Azure DevOps

Standard connector form, described in general in Connectors, with one difference: the Organization ID field is required here. This is the only connector type where the connection cannot be saved without this value.
The connector connects to Azure DevOps Services or to Azure DevOps Server. The values of the first two fields depend on the variant.
| Field | What to enter | Example |
|---|---|---|
| Connector API URL | in Azure DevOps Services the service address; in Azure DevOps Server the server address, with the /tfs segment if the server uses it | https://dev.azure.com or https://server:port/tfs |
| Organization ID | in Azure DevOps Services the organization name, the one from the dev.azure.com/{organization} address; in Azure DevOps Server the collection name | firma or DefaultCollection |
| Personal access token | a token with the Code (Read) and Project and Team (Read) scopes | $$AZURE_TOKEN |
The token field also accepts an environment variable name with the $$ prefix, as in the example above. The variable must exist on the plugin host, and the details of this mechanism are described in Connectors.
The token is generated in Azure DevOps, in the user settings, in the Personal access tokens section. The connector itself needs two scopes: Code (Read) and Project and Team (Read).
To collect CI/CD deployments from YAML Pipelines and Environments, the token additionally needs the Build (Read) and Environment (Read & manage) scopes. Microsoft does not offer the Environment scope in a read-only variant. Q247 reads deployment history through it and writes nothing in the environments. Deployments are collected from Azure DevOps Server starting with version 2020.
The account the token was created on must have access to all the Azure DevOps projects whose repositories are to be analyzed.
See also
- Connectors: the common form, token permissions, statuses
- Running code analysis: what to do after saving the connector
- CI/CD deployments: deployment history from YAML Pipelines and plugin requirements