Configure an agent with Azure DevOps Services
In order to view recipe results and commit changes from a recipe back to Azure DevOps Services, you'll need to register a Microsoft Entra ID OAuth app and configure the Moderne agent with the appropriate variables.
Azure DevOps Services supports two OAuth 2.0 models: Microsoft Entra ID OAuth and the legacy Azure DevOps OAuth 2.0 models. The Moderne platform only supports the Microsoft Entra ID OAuth model.
Azure DevOps Services Configuration
Step 1: Create a Microsoft Entra ID OAuth App registration
Natigate to https://portal.azure.com
Under Azure services, click on Microsoft Entra ID
Click on App registrations
Click on New registration
In the Register an application form:
Enter "Moderne client OAuth app" or similar in the Name field
Select Single Tenant under Supported account types
In the Redirect URI section, enter a Web platform entry with the URL https://your-domain.moderne.io
Click Register
In the app's Overview page click Add a certificate or secret
Click New client sercret
In the Add a client secret form:
Enter "Moderne client OAuth app client secret" or similar in the Description field
Optionally set a non-default secret expiration in the Expires field
Click Add
Under Manage, click on API permissions
Add Azure DevOps permissions for vso.code_manage and vso.graph
Agent configuration
Step 2: Configure the Moderne Agent
The following table contains all of the variables/arguments you need to add to your Moderne agent run command in order for it to work with your Azure DevOps Services instance. Please note that these variables/arguments must be combined with ones found in other steps in the Configuring the Moderne agent guide.
You can configure multiple Azure DevOps OAuth apps by including multiple entries, each with a different {index}
.
Variables:
MODERNE_AGENT_AZUREDEVOPS_{index}_OAUTH_CLIENTID
– The client ID of the registered OAuth app.MODERNE_AGENT_AZUREDEVOPS_{index}_OAUTH_CLIENTSECRET
– The client secret of the registered OAuth app.MODERNE_AGENT_AZUREDEVOPS_{index}_OAUTH_TENANTID
– The Azure tenant ID of the registered OAuth app.MODERNE_AGENT_AZUREDEVOPS_{index}_SKIPSSL
– (Optional) Specifies whether or not to skip SSL validation for HTTP connections to this Azure DevOps instance. This must be set totrue
if you use a self-signed SSL/TLS certificate. Defaults to false.MODERNE_AGENT_AZUREDEVOPS_{index}_SSH_PRIVATEKEY
– (Optional) The SSH private key used to establish a SSH connection with Azure DevOps.MODERNE_AGENT_AZUREDEVOPS_{index}_SSH_PASSPHRASE
– (Required if the SSH private key is specified and encrypted with a passphrase) The passphrase used to encrypt the SSH private key.MODERNE_AGENT_AZUREDEVOPS_{index}_SSH_SSHFILENAME
– (Required if the SSH private key is specified) The file name of the private key, which the agent will store locally.MODERNE_AGENT_AZUREDEVOPS_{index}_SSH_USER
– (Required if the SSH private key is specified) The username used for SSH communication with Azure DevOps.
Example:
Last updated