You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/sre-agent/azure-devops-connector.md
+59-37Lines changed: 59 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
---
2
2
title: "Tutorial: Set Up an Azure DevOps Connector in Azure SRE Agent"
3
-
description: Connect your agent to Azure DevOps for repository access, work item management, and wiki documentation.
3
+
description: Connect your agent to Azure DevOps for repository access, work item management, and wiki documentation using OAuth or PAT authentication.
4
4
ms.topic: tutorial
5
5
ms.service: azure-sre-agent
6
-
ms.date: 03/09/2026
6
+
ms.date: 03/18/2026
7
7
author: craigshoemaker
8
8
ms.author: cshoe
9
9
ms.ai-usage: ai-assisted
10
-
ms.custom: azure devops, connector, repositories, work items, setup, tutorial
10
+
ms.custom: azure devops, connector, repositories, work items, setup, tutorial, oauth, pat
11
11
#customer intent: As an SRE, I want to connect my agent to Azure DevOps so that it can access repositories, wikis, and documentation during investigations.
12
12
---
13
13
14
14
# Tutorial: Set up an Azure DevOps connector in Azure SRE Agent
15
-
In this tutorial, you connect your agent to Azure DevOps so it can access repositories, wikis, and documentation across your organization. When you finish this tutorial, your agent has authenticated access to an Azure DevOps organization and can read repositories, create work items, and correlate code changes with incidents.
15
+
In this tutorial, you connect your agent to Azure DevOps so it can access repositories, wikis, and documentation during investigations. Choose OAuth for automatic token management or PAT for service account scenarios. When you finish this tutorial, your agent has authenticated access to an Azure DevOps organization and can read repositories, create work items, and correlate code changes with incidents.
16
16
17
17
**Estimated time**: 5 minutes
18
18
@@ -49,7 +49,7 @@ The connectors list shows any existing connectors for your agent.
49
49
Select the Azure DevOps OAuth connector type from the wizard.
50
50
51
51
1. Select **Add connector** in the toolbar.
52
-
1. In the **Add a connector** wizard, select **Azure DevOps OAuth connector**.
52
+
1. In **Add a connector**, select **Azure DevOps OAuth connector**.
53
53
1. Select **Next**.
54
54
55
55
:::image type="content" source="media/azure-devops-connector/oauth-connector-picker-all.png" alt-text="Screenshot of the connector picker showing Azure DevOps OAuth connector option." lightbox="media/azure-devops-connector/oauth-connector-picker-all.png":::
@@ -91,34 +91,31 @@ The organization name must:
91
91
92
92
Choose how your agent authenticates to Azure DevOps:
93
93
94
-
| Method |When to use|
95
-
|--------|-------------|
96
-
|**User account**| Quick setup for individual users. Sign in with your Microsoft Entra ID account.|
97
-
|**Managed identity**|Production agents that need persistent, unattended access. |
94
+
| Method |Best for | Token lifecycle|
95
+
|--------|----------|----------------|
96
+
|**User account**| Quick setup with your Microsoft Entra ID identity | Auto refreshes with no manual renewal|
97
+
|**Managed identity**|Unattended production agents | Managed by Azure. There is no expiration. |
98
98
99
99
> [!TIP]
100
-
> Use PAT authentication through the **Documentation connector** (Azure DevOps). For more information, see the [alternative PAT path](#alternative-set-up-with-pat-authentication) section later in this article, or [learn more about connectors](connectors.md).
100
+
> OAuth uses your Microsoft Entra ID session so you never manage tokens manually. Tokens refresh automatically in the background. Choose PAT only when you need a service account connection or CI/CD pipeline integration. See the [alternative PAT path](#alternative-set-up-with-pat-authentication) section later in this article.
101
101
102
102
## Sign in with user account (OAuth)
103
103
104
104
If you select **User account**, complete OAuth authentication by using your Microsoft Entra ID credentials.
105
105
106
106
1. Select **Sign in to Azure DevOps**.
107
-
1. Complete the Microsoft Entra ID authentication in the dialog.
107
+
1. An **Authorize Azure DevOps** consent dialog appears, listing the permissions your agent needs:
108
+
- Read and write access to repositories and projects
109
+
- Act on behalf of the signed-in user
110
+
1. Select **Authorize** to grant access.
108
111
1. On success, you see **Connected to Azure DevOps** with a green checkmark.
109
112
110
-
> [!WARNING]
111
-
> If the authentication dialog doesn't appear, check that your browser isn't blocking popups from `sre.azure.com`.
112
-
113
-
If authentication fails, a dialog shows **Authentication Failed** with details. Check that:
114
-
115
-
- Your Microsoft Entra ID account has access to the specified organization.
116
-
- Your account has the `vso.code` (Code.Read) scope.
113
+
**Checkpoint:** The **Connected to Azure DevOps** card appears with a green checkmark. If you see an error instead, check that your Microsoft Entra ID account has access to the specified organization.
117
114
118
115
> [!TIP]
119
-
> Select **Sign in with different account** to re-authenticate by using a different Microsoft Entra ID identity.
116
+
> Select **Sign in with different account** to reauthenticate by using a different Microsoft Entra ID identity.
120
117
121
-
## Use Managed identity (alternative)
118
+
## Use managed identity (alternative)
122
119
123
120
If you select **Managed identity**, configure the identity your agent uses for unattended authentication.
124
121
@@ -140,7 +137,7 @@ Confirm the connector details and create the connector.
140
137
-**Name**: your chosen name
141
138
-**Organization**: your Azure DevOps organization
142
139
-**Type**: Azure DevOps OAuth
143
-
1. Select **Add** to create the connector.
140
+
1. Select **Add connector** to create the connector.
144
141
145
142
Your connector now appears in the connectors list with a **Connected** status indicator.
146
143
@@ -161,7 +158,7 @@ Show me recent commits in the payment-service repository.
161
158
```
162
159
163
160
> [!NOTE]
164
-
> If your agent returns repository information, your connector is working. If you see a "Token lacks Code.Read permission" error, re-authenticate and ensure your account has the `vso.code` scope.
161
+
> If your agent returns repository information, your connector is working. If you see a "Token lacks `Code.Read` permission" error, reauthenticate and ensure your account has the `vso.code` scope.
165
162
166
163
## Alternative: Set up with PAT authentication
167
164
@@ -172,9 +169,9 @@ If your team uses Personal Access Tokens (PATs) instead of OAuth, use the **Docu
172
169
1. Enter a **Name** and your **Azure DevOps URL** (repository or wiki URL).
173
170
1. Under **Authentication method**, select **Personal Access Token (PAT)**.
174
171
1. Enter your Azure DevOps PAT in the secure input field.
175
-
1. Select **Next** to review, then select **Add**.
172
+
1. Select **Next** to review, and then select **Add**.
176
173
177
-
Your PAT is stored securely and can't be retrieved after saving. The connector tests connectivity before saving. If the PAT lacks the required `vso.code` scope, the connector creation fails with a clear error message.
174
+
Your PAT is stored securely and you can't retrieve it after saving. The connector tests connectivity before saving. If the PAT lacks the required `vso.code` scope, the connector creation fails with a clear error message.
178
175
179
176
The following URL formats are accepted:
180
177
@@ -183,31 +180,56 @@ The following URL formats are accepted:
183
180
- Wiki URLs: `https://dev.azure.com/{org}/{project}/_wiki/wikis/{wiki}`
184
181
185
182
> [!TIP]
186
-
> Use PAT authentication when your organization already manages Azure DevOps PATs, when you need a service account connection without user-specific OAuth, or when integrating with CI/CD pipelines.
183
+
> Use PAT authentication when your organization already manages Azure DevOps PATs, when you need a service account connection without user-specific OAuth, or when you're integrating with CI/CD pipelines.
187
184
188
-
## Troubleshooting
185
+
## Edit or remove a connector
189
186
190
-
Use the following information to resolve common errors when setting up an Azure DevOps connector.
187
+
You can modify or delete existing connectors from the connectors list.
191
188
192
-
### "Azure DevOps access token not configured. Please authenticate."
189
+
### Edit
193
190
194
-
No OAuth token exists for this connector. Edit the connector and sign in again.
191
+
1. In the connectors list, select the **⋮** (more actions) menu on the connector row.
192
+
1. Select **Edit connector**.
193
+
1. The edit dialog opens with your current settings. Modify the organization, reauthenticate, or change the managed identity.
194
+
1. Select **Save**.
195
195
196
-
### "Token lacks Code.Read permission"
196
+
### Delete
197
197
198
-
Your token doesn't have the `vso.code` scope required to access repositories. Sign in again by using an account that has Code.Read permissions in the organization.
198
+
To remove a single connector:
199
199
200
-
### "Organization not configured for this connector"
200
+
1. Select **⋮** on the connector row, and then select **Delete connector**.
201
+
1. Confirm the deletion.
201
202
202
-
The organization name is missing from the connector configuration. Delete and re-create the connector with the correct organization name.
203
+
To remove multiple connectors at once:
203
204
204
-
### "A connector for this organization already exists"
205
+
1. Select connectors by using the checkboxes in the grid.
206
+
1. Select **Remove** in the toolbar.
207
+
1. Confirm in the deletion dialog.
205
208
206
-
You already have an Azure DevOps OAuth connector for this organization. Each organization can only have one connector. Edit the existing connector or delete it first.
209
+
## Troubleshooting
207
210
208
-
### "A connector with this name already exists"
211
+
Use the following information to resolve common errors when setting up an Azure DevOps connector.
209
212
210
-
Another connector (of any type) already uses this name. Choose a different name for your Azure DevOps connector.
213
+
| Issue | Solution |
214
+
|-------|----------|
215
+
| "Authorize Azure DevOps" dialog doesn't appear | Refresh the page and try again. If your Microsoft Entra ID session expired, sign in again at the portal. |
216
+
| "Invalid or expired token" | Your Microsoft Entra ID session expired. Refresh the portal page to get a new session, then try signing in again. |
217
+
| "Azure DevOps access token not configured. Please authenticate." | No OAuth token exists for this connector. Edit the connector and sign in again. |
218
+
| "Token lacks `Code.Read` permission" | Re-authenticate with an account that has `Code.Read` permissions in the organization. |
219
+
| "Organization not configured for this connector" | Organization name is missing. Delete and re-create the connector with the correct organization name. |
220
+
| "A connector for this organization already exists" | Each organization can only have one connector. Edit the existing one or delete it first. |
221
+
| "A connector with this name already exists" | Another connector already uses this name. Choose a different name. |
222
+
| Sign-in button is disabled | Enter your organization name first. The button enables once the **Organization** field is filled. |
223
+
224
+
## Summary
225
+
226
+
In this tutorial, you learned how to:
227
+
228
+
- Add an Azure DevOps connector by using OAuth or managed identity authentication
229
+
- Understand the difference between OAuth (autorefreshing) and PAT (manually managed) authentication
230
+
- Verify that your agent can access your Azure DevOps repositories
231
+
- Set up PAT authentication through the documentation connector
232
+
- Set up multiple connectors for different organizations
|**Azure Monitor metrics**| List and query metrics, analyze trends and anomalies |
36
+
|**Azure Monitor metrics**| List and query metrics, analyze trends, and anomalies |
37
37
|**Azure Resource Graph**| Discover and query any Azure resource across subscriptions |
38
38
|**Azure Resource Manager / Azure CLI**| Read and modify any Azure resource type |
39
39
|**AKS diagnostics**| Run kubectl commands, diagnose Kubernetes issues |
40
40
41
-
Azure Resource Graph and ARM operations work with any Azure resource type, including App Services, Container Apps, VMs, networking, storage, and more. If your logs and metrics live in Azure Monitor and Application Insights, your agent can start investigating problems immediately with no connector setup required. Connectors become valuable when you need the agent to reach systems *outside* Azure.
41
+
Azure Resource Graph and Azure Resource Manager operations work with any Azure resource type, including App Services, Container Apps, VMs, networking, storage, and more. If your logs and metrics live in Azure Monitor and Application Insights, your agent can start investigating problems immediately with no connector setup required. Connectors become valuable when you need the agent to reach systems *outside* Azure.
|**Database query (Azure Data Explorer)**| Run predefined KQL queries against your Kusto clusters |
54
-
|**Database indexing (Azure Data Explorer)**|Auto-learn your Kusto schema so the agent can generate queries dynamically |
54
+
|**Database indexing (Azure Data Explorer)**|Autolearn your Kusto schema so the agent can generate queries dynamically |
55
55
56
56
### Source code and knowledge
57
57
@@ -79,7 +79,7 @@ Let your agent communicate findings through the channels your team already uses.
79
79
80
80
By using MCP (Model Context Protocol), you can connect your agent to any system: on-premises databases, cross-cloud applications, proprietary APIs, or third-party platforms like Datadog, Splunk, Grafana, or Jira.
81
81
82
-
Browse available servers at [Azure MCP Center](https://mcp.azure.com). When adding MCP tools to subagents, you can add all tools from a server at once by using the [wildcard pattern](#add-all-tools-from-an-mcp-server-wildcard).
82
+
Browse available servers at [Azure MCP Center](https://mcp.azure.com). When you add MCP tools to custom agents, use the [wildcard pattern](#add-all-tools-from-an-mcp-server-wildcard) to add all tools from a server at once.
83
83
84
84
## MCP connector health monitoring
85
85
@@ -95,7 +95,7 @@ Your agent continuously monitors the health of every MCP server connection. Each
95
95
|**Initializing**| Connection is being established | Yellow indicator |
96
96
|**Not Available**| No running agent instance is available; status can't be determined | Gray question mark |
97
97
98
-
Go to **Builder > Connectors** to see all your connectors with their current status.
98
+
Go to **Builder** > **Connectors** to see all your connectors with their current status.
99
99
100
100
:::image type="content" source="media/connectors/connectors-status-indicators.png" alt-text="Screenshot of connectors list showing status indicators for each MCP server connection.":::
101
101
@@ -114,9 +114,9 @@ Your agent doesn't just report broken connections. It recovers from them when po
114
114
>
115
115
> If an MCP server goes offline, the connector stays visible in your portal with its error status. It doesn't silently disappear. You can see exactly what went wrong and fix the configuration without re-creating the connector.
116
116
117
-
### When auto-recovery can't help
117
+
### When autorecovery can't help
118
118
119
-
The following table describes scenarios where automatic recovery might not resolve the issue.
119
+
The following table describes scenarios where automatic recovery can't resolve the issue.
120
120
121
121
| Situation | What happens | What to do |
122
122
|---|---|---|
@@ -144,13 +144,13 @@ For connectors that use the agent's **managed identity** (like Azure Data Explor
144
144
145
145
Once configured, all agent users benefit from connectors automatically. They just ask the agent questions and it uses the available connectors behind the scenes.
146
146
147
-
## Connectors and subagents
147
+
## Connectors and custom agents
148
148
149
-
You can assign specific MCP tools to specialized subagents. A database troubleshooting subagent might get Kusto tools, while a deployment subagent gets GitHub access. This approach keeps each subagent focused and prevents overwhelming it with too many tools.
149
+
You can assign specific MCP tools to specialized custom agents. A database troubleshooting custom agent might get Kusto tools, while a deployment custom agent gets GitHub access. This approach keeps each custom agent focused and prevents overwhelming it with too many tools.
150
150
151
151
### Add MCP tools individually
152
152
153
-
In the portal, go to **Builder > Subagent builder**, create or edit a subagent, and select **Choose tools** under Advanced settings. The tool picker displays tools grouped by MCP connection. Select the ones your subagent needs.
153
+
In the portal, go to **Builder** > **Custom agent builder**, create or edit a custom agent, and select **Choose tools** under Advanced settings. The tool picker displays tools grouped by MCP connection. Select the ones your custom agent needs.
154
154
155
155
In YAML, list each tool by its full name:
156
156
@@ -165,7 +165,7 @@ mcp_tools:
165
165
166
166
**Applies to**: version 26.2.9.0 and later
167
167
168
-
When an MCP server exposes many tools and your subagent needs all of them, use the wildcard pattern instead of listing each tool individually:
168
+
When an MCP server exposes many tools and your custom agent needs all of them, use the wildcard pattern instead of listing each tool individually:
169
169
170
170
```yaml
171
171
mcp_tools:
@@ -191,17 +191,17 @@ The following table compares individual tool selection and the wildcard approach
191
191
192
192
| Approach | When to use |
193
193
|---|---|
194
-
| **Individual tools** | You want precise control over which tools a subagent can access |
194
+
| **Individual tools** | You want precise control over which tools a custom agent can access |
195
195
| **Wildcard (`connection-id/*`)** | You trust the MCP server and want all its tools, including any added later |
196
196
| **Mixed** | You want all tools from one server, plus specific tools from another |
197
197
198
-
**Why use the wildcard?** When an MCP server adds new tools, the wildcard picks them up automatically without reconfiguring your subagent. Individual tool selection gives you precise control. The wildcard gives you automatic coverage.
198
+
**Why use the wildcard?** When an MCP server adds new tools, the wildcard picks them up automatically without reconfiguring your custom agent. Individual tool selection gives you precise control. The wildcard gives you automatic coverage.
199
199
200
200
### When MCP tools aren't ready yet
201
201
202
-
If an MCP server isn't ready when your agent starts, the agent can't access tools from that server. Your agent handles this condition gracefully. The agent defers subagents with unresolved wildcards or missing tools and automatically loads them once the agent establishes the MCP connection. You don't need to take any manual action.
202
+
If an MCP server isn't ready when your agent starts, your agent can't access tools from that server. Your agent handles this condition gracefully. It defers custom agents with unresolved wildcards or missing tools and automatically loads them once your agent establishes the MCP connection. You don't need to take any manual action.
203
203
204
-
For more information, see [Subagents](sub-agents.md).
204
+
For more information, see [Custom Agents](sub-agents.md).
205
205
206
206
## Next step
207
207
@@ -211,6 +211,6 @@ For more information, see [Subagents](sub-agents.md).
211
211
## Related content
212
212
213
213
- [Incident platforms](incident-platforms.md): Learn how your agent receives and responds to incidents automatically.
214
-
- [Connect source code](./connect-source-code.md): Set up GitHub or Azure DevOps connectors.
215
-
- [Subagents](sub-agents.md): Create specialized agents with focused connector access.
214
+
- [Connect source code](connect-source-code.md): Set up GitHub or Azure DevOps connectors.
215
+
- [Custom Agents](sub-agents.md): Create specialized agents with focused connector access.
216
216
- [Permissions](permissions.md): Configure Azure resource access for your agent.
0 commit comments