Skip to content

Commit 1fa9f5f

Browse files
Merge pull request #9105 from MicrosoftDocs/main
Auto Publish – main to live - 2026-04-04 01:00 UTC
2 parents 5fd3615 + e5575d6 commit 1fa9f5f

5 files changed

Lines changed: 77 additions & 100 deletions

File tree

docs/integrate/get-started/rest/samples.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.custom: devx-track-dotnet, pat-reduction, copilot-scenario-highlight
99
monikerRange: '<= azure-devops'
1010
ms.author: chcomley
1111
author: chcomley
12-
ms.date: 03/02/2026
12+
ms.date: 03/30/2026
1313
---
1414

1515
# REST API samples for Azure DevOps
@@ -26,14 +26,13 @@ Azure DevOps REST APIs support several authentication methods:
2626

2727
- **Microsoft Entra ID** - Recommended for production applications (used in these samples)
2828
- **Personal Access Tokens (PATs)** - Simple authentication for scripts and testing
29-
- **OAuth 2.0** - For third-party applications
30-
- **Service principals** - For automated scenarios
29+
- **Service principals and managed identities** - For automated scenarios
3130

3231
[!INCLUDE [ai-assistance-mcp-server-tip](../../../includes/ai-assistance-mcp-server-tip.md)]
3332

3433
### Microsoft Entra ID authentication
3534

36-
For Microsoft Entra ID authentication, you'll need to register an application and obtain an access token. Here's how to authenticate using the Microsoft Authentication Library (MSAL):
35+
For Microsoft Entra ID authentication, register an application and get an access token. Here's how to authenticate by using the Microsoft Authentication Library (MSAL):
3736

3837
First, install the required NuGet package:
3938

@@ -497,20 +496,20 @@ catch (Exception ex)
497496

498497
## Best practices
499498

500-
- **Use Microsoft Entra ID**: Use Microsoft Entra ID authentication over PATs for production applications
501-
- **Use HTTPS**: Always use secure connections for API calls
502-
- **Handle rate limits**: Implement retry logic with exponential backoff
503-
- **Cache responses**: Store frequently accessed data to reduce API calls
504-
- **Use specific API versions**: Pin to specific versions to avoid breaking changes
505-
- **Validate inputs**: Always validate user inputs before making API calls
506-
- **Log appropriately**: Log API interactions for debugging, but never log credentials
507-
- **Token management**: Implement proper token caching and refresh logic for Microsoft Entra ID tokens
499+
- **Use Microsoft Entra ID**: Use Microsoft Entra ID authentication over PATs for production applications.
500+
- **Use HTTPS**: Always use secure connections for API calls.
501+
- **Handle rate limits**: Implement retry logic with exponential backoff.
502+
- **Cache responses**: Store frequently accessed data to reduce API calls.
503+
- **Use specific API versions**: Pin to specific versions to avoid breaking changes.
504+
- **Validate inputs**: Always validate user inputs before making API calls.
505+
- **Log appropriately**: Log API interactions for debugging, but never log credentials.
506+
- **Token management**: Implement proper token caching and refresh logic for Microsoft Entra ID tokens.
508507

509508
<a id="use-ai-assistance"></a>
510509

511510
## Use AI to generate REST API code
512511

513-
If you have the [Azure DevOps MCP Server](../../../mcp-server/mcp-server-overview.md) connected to your AI agent in agent mode, you can use natural language prompts to generate REST API code for Azure DevOps.
512+
If you connect the [Azure DevOps MCP Server](../../../mcp-server/mcp-server-overview.md) to your AI agent in agent mode, you can use natural language prompts to generate REST API code for Azure DevOps.
514513

515514
| Task | Example prompt |
516515
|------|----------------|

docs/integrate/how-to/call-rest-api.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ai-usage: ai-assisted
99
monikerRange: '<= azure-devops'
1010
ms.author: chcomley
1111
author: chcomley
12-
ms.date: 03/02/2026
12+
ms.date: 03/31/2026
1313
---
1414

1515
# Get started with the REST APIs
@@ -34,7 +34,7 @@ VERB https://{instance}/{collection}/{team-project}/_apis/{area}/{resource}?api-
3434
```
3535

3636
> [!TIP]
37-
> As APIs evolve, we recommend that you include an API version in every request. This practice can help you avoid unexpected changes in the API that could break.
37+
> As APIs evolve, include an API version in every request. This practice helps you avoid unexpected changes in the API that could break your application.
3838
3939
### [Azure DevOps Services](#tab/services)
4040

@@ -67,8 +67,7 @@ Azure DevOps REST APIs support several authentication methods:
6767

6868
- **Microsoft Entra ID** - Recommended for production applications
6969
- **Personal Access Tokens (PATs)** - Simple authentication for scripts and testing
70-
- **OAuth 2.0** - For non-Microsoft applications
71-
- **Service principals** - For automated scenarios
70+
- **Service principals and managed identities** - For automated scenarios
7271

7372
[!INCLUDE [use-microsoft-entra-reduce-pats](../../includes/use-microsoft-entra-reduce-pats.md)]
7473

@@ -126,8 +125,8 @@ Content-Type: application/json-patch+json
126125

127126
### HTTP method override
128127

129-
Some web proxies might only support the HTTP verbs GET and POST, but not more modern HTTP verbs like PATCH and DELETE.
130-
If your calls might pass through one of these proxies, you can send the actual verb using a POST method, with a header to override the method.
128+
Some web proxies support only the HTTP verbs GET and POST. They don't support more modern HTTP verbs like PATCH and DELETE.
129+
If your calls might pass through one of these proxies, send the actual verb by using a POST method with a header to override the method.
131130
For example, you might want to [update a work item](/rest/api/azure/devops/wit/work-items/update) (`PATCH _apis/wit/workitems/3`), but you might have to go through a proxy that only allows GET or POST.
132131
You can pass the proper verb (PATCH in this case) as an HTTP request header parameter and use POST as the actual HTTP method.
133132

@@ -194,13 +193,13 @@ For practical implementation guidance and complete code examples, see:
194193
* [REST API samples](../get-started/rest/samples.md) - Complete examples with Microsoft Entra ID authentication
195194
* [Authentication guidance](../get-started/authentication/authentication-guidance.md) - Detailed authentication options
196195
* [REST API versioning](../concepts/rest-api-versioning.md) - API lifecycle information
197-
* [OAuth 2.0](../get-started/authentication/oauth.md) - OAuth implementation details
196+
* [Microsoft Entra OAuth](../get-started/authentication/entra-oauth.md) - OAuth implementation with Microsoft Entra ID
198197

199198
<a id="use-ai-assistance"></a>
200199

201200
## Use AI to build REST API calls
202201

203-
If you have the [Azure DevOps MCP Server](../../mcp-server/mcp-server-overview.md) connected to your AI agent in agent mode, you can use natural language prompts to generate and troubleshoot REST API calls.
202+
If you connect [Azure DevOps MCP Server](../../mcp-server/mcp-server-overview.md) to your AI agent in agent mode, you can use natural language prompts to generate and troubleshoot REST API calls.
204203

205204
| Task | Example prompt |
206205
|------|----------------|

docs/organizations/settings/about-settings.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ Individual contributors can customize their experience in Azure DevOps by settin
107107
:::column span="2":::
108108
- [Authenticate access with Microsoft Entra tokens](../../integrate/get-started/authentication/entra.md)
109109
- [Use SSH key authentication](../../repos/git/use-ssh-keys-to-authenticate.md)
110-
- [Manage OAuth app authorizations](manage-authorizations.md)
111110
- [Authenticate access with personal access tokens](../accounts/use-personal-access-tokens-to-authenticate.md)
112111
:::column-end:::
113112
:::column span="2":::

docs/user-guide/manage-organization-collection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Have at least two people with administrative privileges. To find existing admins
8585

8686
### Set security policies
8787

88-
Configure security policies in **Organization settings** > **Policies** to control OAuth access, SSH authentication, public project creation, and GitHub account invitations. For more information, see [Change application connection & security policies](../organizations/accounts/change-application-access-policies.md).
88+
Configure security policies in **Organization settings** > **Policies** to control application access, SSH authentication, public project creation, and GitHub account invitations. For more information, see [Change application connection & security policies](../organizations/accounts/change-application-access-policies.md).
8989

9090
:::image type="content" source="../media/policies/security-policies.png" alt-text="Screenshot of Azure DevOps Security Policies.":::
9191

0 commit comments

Comments
 (0)