Azure DevOps
Overview
Connect Azure DevOps to StackGuardian to source Infrastructure as Code (IaC) and Policy code from your repositories and trigger Workflow runs automatically.
Set up the connector
- In StackGuardian, navigate to Organization Settings → Connectors → Version control providers.
- Select + Connect with VCS provider.
- In the Connect with VCP modal, select Azure DevOps as the version control provider.
- Choose an authentication method:
Service principal with federated credentials
This method uses an Azure AD service principal with federated credentials via OpenID Connect (OIDC) to authenticate with Azure DevOps. It avoids managing client secrets by using a trusted identity provider.
Before setting up the connector, you must configure an Azure AD application with:
- Tenant ID (Directory ID)
- Client ID (Application ID)
- Federated credentials configured for StackGuardian
- Permissions to access Azure DevOps
You must also add the service principal as a user in your Azure DevOps organization and grant it:
- Basic access level (required for API access)
- Reader permissions on the relevant projects

Service principal with federated credentials
Configure Connector in StackGuardian
To complete the connection, visit the StackGuardian platform and follow these steps:
- Go to the Connectors tab in the StackGuardian Orchestrator.
- Click on Version Control Providers > Connect with VCS Provider.
- Click on Azure DevOps.
- Select Service principal with federated credentials as the Access Type.
- Enter a Connector name.
- Enter the following information:
- Tenant ID (Directory ID)
- Subscription ID
- Client ID (Application ID)
- Click Create to finalize the configuration of the Connector.

Personal Access Token connector creation
Service principal with client secret
This method uses an Azure AD service principal with a client secret to authenticate with Azure DevOps.
Before setting up the connector, you must configure an Azure AD application with:
- Tenant ID (Directory ID)
- Client ID (Application ID)
- Client secret
- Permissions to access Azure DevOps
You must also add the service principal as a user in your Azure DevOps organization and grant it:
- Basic access level (required for API access)
- Reader permissions on the relevant projects
Configure Connector in StackGuardian
- Go to the Connectors tab in the StackGuardian Orchestrator.
- Click on Version Control Providers > Connect with VCS Provider.
- Click on Azure DevOps.
- Select Service principal with client secret as the Access Type.
- Enter a Connector name.
- Enter the following information:
- Tenant ID (Directory ID)
- Subscription ID
- Client ID (Application ID)
- Client Secret Value
- Click Create to finalize the configuration of the Connector.

Service principal with client secret
Personal access token
To connect Azure DevOps using a Personal access token, you need to create a token in Azure DevOps with limited permissions:
- On the Azure DevOps platform, go to the target repository for the Access Token.
- Select User Settings on the top navbar, beside your profile name.
- Under the dropdown select Personal Access Tokens.
- Click on New Token.
- Provide a name for the token that relates to the app or task using it.
- Select the required Scopes for the token.
- Click Create to generate the token.
- Copy the generated token and securely store it for later use.

Azure DevOps token creation
Configure Connector in StackGuardian
To complete the connection, visit the StackGuardian platform and follow these steps:
- Go to the Connectors tab in the StackGuardian Orchestrator.
- Click on Version Control Providers > Connect with VCS Provider.
- Click on Azure DevOps.
- Enter a Connector name.
- Select Personal access token as the Access Type.
- In the Personal access token field, paste the Access token created earlier.
- Click Create to finalize the configuration of the Connector.

Personal Access Token connector creation