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
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):
37
36
38
37
First, install the required NuGet package:
39
38
@@ -497,20 +496,20 @@ catch (Exception ex)
497
496
498
497
## Best practices
499
498
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.
508
507
509
508
<aid="use-ai-assistance"></a>
510
509
511
510
## Use AI to generate REST API code
512
511
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.
> 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.
38
38
39
39
### [Azure DevOps Services](#tab/services)
40
40
@@ -67,8 +67,7 @@ Azure DevOps REST APIs support several authentication methods:
67
67
68
68
-**Microsoft Entra ID** - Recommended for production applications
69
69
-**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
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.
131
130
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.
132
131
You can pass the proper verb (PATCH in this case) as an HTTP request header parameter and use POST as the actual HTTP method.
133
132
@@ -194,13 +193,13 @@ For practical implementation guidance and complete code examples, see:
194
193
*[REST API samples](../get-started/rest/samples.md) - Complete examples with Microsoft Entra ID authentication
*[Microsoft Entra OAuth](../get-started/authentication/entra-oauth.md) - OAuth implementation with Microsoft Entra ID
198
197
199
198
<aid="use-ai-assistance"></a>
200
199
201
200
## Use AI to build REST API calls
202
201
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.
Copy file name to clipboardExpand all lines: docs/user-guide/manage-organization-collection.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ Have at least two people with administrative privileges. To find existing admins
85
85
86
86
### Set security policies
87
87
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).
89
89
90
90
:::image type="content" source="../media/policies/security-policies.png" alt-text="Screenshot of Azure DevOps Security Policies.":::
0 commit comments