Skip to content

Commit a603f39

Browse files
Learn Build Service GitHub AppLearn Build Service GitHub App
authored andcommitted
Merging changes synced from https://github.com/MicrosoftDocs/azure-devops-docs-pr (branch live)
2 parents de8ae55 + af84e8d commit a603f39

File tree

7 files changed

+505
-476
lines changed

7 files changed

+505
-476
lines changed

docs/demo-gen/use-demo-generator-v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Use one of the following methods to authenticate to the Azure DevOps Demo Genera
2929

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

32-
- **Personal Access Token (PAT):** Sign in with a [Personal Access Token (PAT)](../organizations/accounts/use-personal-access-tokens-to-authenticate.md#creating-pats) with the following scopes:
32+
- **Personal Access Token (PAT):** Sign in with a [Personal Access Token (PAT)](../organizations/accounts/use-personal-access-tokens-to-authenticate.md#create-pats) with the following scopes:
3333

3434
| Scope | Description |
3535
| -------------------------- | ------------------------------------------ |
Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Authentication Methods For Azure DevOps
3-
titleSuffix: Azure DevOps
2+
title: Authentication Methods for Azure DevOps
3+
titleSuffix: Azure DevOps
44
description: Choose the right authentication method for your Azure DevOps integration, with Microsoft Entra ID as the recommended approach.
55
ms.assetid: 15CCEB1E-F42B-4439-8C35-B8A225F5546C
66
ms.subservice: azure-devops-security
@@ -17,29 +17,29 @@ ms.date: 07/21/2025
1717

1818
[!INCLUDE [version-lt-eq-azure-devops](../../../includes/version-lt-eq-azure-devops.md)]
1919

20-
This article describes authentication methods for Azure DevOps integration and helps you choose the best option for your scenario. Modern authentication approaches like Microsoft Entra ID provide enhanced security and provide the best approach for new applications.
20+
This article describes authentication methods for Azure DevOps integration and helps you choose the best option for your scenario. Modern authentication approaches like Microsoft Entra ID provide enhanced security and the best approach for new applications.
2121

2222
> [!IMPORTANT]
23-
> Microsoft Entra ID authentication is recommended for new applications integrating with Azure DevOps Services.
24-
> Use personal access tokens sparingly, and only use them when Microsoft Entra ID isn't available.
23+
> We recommend Microsoft Entra ID authentication for new applications that integrate with Azure DevOps Services.
24+
> Use personal access tokens sparingly, and use them only when Microsoft Entra ID isn't available.
2525
2626
OAuth 2.0 and Microsoft Entra ID authentication are available for Azure DevOps Services only, not Azure DevOps Server.
2727

2828
For on-premises scenarios, use [.NET client libraries](../../concepts/dotnet-client-libraries.md), Windows authentication, or [personal access tokens](../../../organizations/accounts/use-personal-access-tokens-to-authenticate.md).
2929

3030
## Authentication methods by scenario
3131

32-
Choose the appropriate authentication method based on your application type and requirements:
32+
Choose the appropriate authentication method based on your application type and requirements.
3333

3434
| Application type | Description | Example | Recommended method | Code samples |
3535
|------------------|-------------|---------|--------------------|--------------|
36-
| **Web/desktop apps** | Interactive applications using current frameworks | React app, .NET desktop app | [Microsoft Entra OAuth](./entra-oauth.md) with the Microsoft Authentication Library (MSAL) | [Managed client console app](https://github.com/microsoft/azure-devops-auth-samples/tree/master/ManagedClientConsoleAppSample) |
37-
| **Service/background apps** | Applications running without user interaction | Azure Functions, background services | [Service principals and managed identities](./service-principal-managed-identity.md) | [Service principals](https://github.com/microsoft/azure-devops-auth-samples/tree/master/ServicePrincipalsSamples) |
38-
| **Legacy client apps** | Existing applications using client libraries | Console apps with Azure DevOps .NET libraries | [.NET client libraries](../../concepts/dotnet-client-libraries.md) with OAuth | [Client library console app](https://github.com/Microsoft/vsts-auth-samples/tree/master/ClientLibraryConsoleAppSample) |
39-
| **Headless/CLI apps** | Non-interactive command-line tools | Build scripts, automation tools | [Device authorization grant flow](/entra/identity-platform/v2-oauth2-device-code) | [Device profile](https://github.com/Microsoft/vsts-auth-samples/tree/master/DeviceProfileSample) |
40-
| **Azure DevOps extensions** | Extensions running within Azure DevOps | Custom dashboard widgets and work item forms | [Azure DevOps web extension SDK](https://github.com/Microsoft/azure-devops-extension-sdk) | [Add a dashboard widget](../../../extend/develop/add-dashboard-widget.md) |
41-
| **Azure DevOps Server apps** | On-premises Azure DevOps Server integrations | Custom server extensions | [.NET client libraries](../../concepts/dotnet-client-libraries.md) or Windows Auth | [Client library console app](https://github.com/Microsoft/vsts-auth-samples/tree/master/ClientLibraryConsoleAppSample) |
42-
| **Personal/ad-hoc scripts** | Quick scripts for personal use | PowerShell scripts, curl commands | [Personal access tokens](../../../organizations/accounts/use-personal-access-tokens-to-authenticate.md) | [Get started with the REST APIs](../../how-to/call-rest-api.md) |
36+
| Web/desktop apps | Interactive applications using current frameworks | React app, .NET desktop app | [Microsoft Entra OAuth](./entra-oauth.md) with the Microsoft Authentication Library (MSAL) | [Managed client console app](https://github.com/microsoft/azure-devops-auth-samples/tree/master/ManagedClientConsoleAppSample) |
37+
| Service/background apps | Applications running without user interaction | Azure Functions, background services | [Service principals and managed identities](./service-principal-managed-identity.md) | [Service principals](https://github.com/microsoft/azure-devops-auth-samples/tree/master/ServicePrincipalsSamples) |
38+
| Legacy client apps | Existing applications using client libraries | Console apps with Azure DevOps .NET libraries | [.NET client libraries](../../concepts/dotnet-client-libraries.md) with OAuth | [Client library console app](https://github.com/Microsoft/vsts-auth-samples/tree/master/ClientLibraryConsoleAppSample) |
39+
| Headless/CLI apps | Noninteractive command-line tools | Build scripts, automation tools | [Device authorization grant flow](/entra/identity-platform/v2-oauth2-device-code) | [Device profile](https://github.com/Microsoft/vsts-auth-samples/tree/master/DeviceProfileSample) |
40+
| Azure DevOps extensions | Extensions running within Azure DevOps | Custom dashboard widgets and work item forms | [Azure DevOps web extension SDK](https://github.com/Microsoft/azure-devops-extension-sdk) | [Add a dashboard widget](../../../extend/develop/add-dashboard-widget.md) |
41+
| Azure DevOps Server apps | On-premises Azure DevOps Server integrations | Custom server extensions | [.NET client libraries](../../concepts/dotnet-client-libraries.md) or Windows Auth | [Client library console app](https://github.com/Microsoft/vsts-auth-samples/tree/master/ClientLibraryConsoleAppSample) |
42+
| Personal/ad hoc scripts | Quick scripts for personal use | PowerShell scripts, curl commands | [Personal access tokens](../../../organizations/accounts/use-personal-access-tokens-to-authenticate.md) | [Get started with the REST APIs](../../how-to/call-rest-api.md) |
4343

4444
## Suggestions for getting started
4545

@@ -60,64 +60,64 @@ The following sections provide recommendations for getting started in different
6060
### Azure DevOps Server
6161

6262
- Use [.NET client libraries](../../concepts/dotnet-client-libraries.md) with Windows Authentication when possible.
63-
- Personal access tokens are acceptable for some Azure DevOps Server scenarios.
63+
- Use personal access tokens for Azure DevOps Server scenarios when they're acceptable.
6464
- Plan for future Azure DevOps Services migration to take advantage of modern authentication.
6565

66-
## Answers to common questions
66+
## Answers to common questions
6767

6868
The following sections provide answers to frequently asked questions.
6969

7070
### Should I use Microsoft Entra ID OAuth or personal access tokens?
7171

72-
**Use Microsoft Entra ID OAuth** in the following scenarios:
72+
Use Microsoft Entra ID OAuth in the following scenarios:
7373

7474
- New applications and integrations
7575
- Production workloads that require robust security
7676
- Applications that need enterprise identity integration
7777
- Long-term projects with compliance requirements
7878

79-
**Only use Personal Access Tokens** in the following scenarios:
79+
Only use personal access tokens in the following scenarios:
8080

81-
- Personal scripts and ad-hoc tasks
81+
- Personal scripts and ad hoc tasks
8282
- Legacy applications during migration planning
8383
- Azure DevOps Server scenarios where modern authentication isn't available
8484

8585
### Should I use service principals or user delegation for authentication?
8686

87-
**Use service principals or managed identities** in the following scenarios:
87+
Use service principals or managed identities in the following scenarios:
8888

89-
- Build applications that operate independently (background services, automation)
90-
- Create apps that don't require user interaction
91-
- Implement service-to-service communication
92-
- Build CI/CD pipelines or automated workflows
89+
- Build applications that operate independently (background services, automation).
90+
- Create apps that don't require user interaction.
91+
- Implement service-to-service communication.
92+
- Build continuous integration and continuous delivery (CI/CD) pipelines or automated workflows.
9393

94-
**Use user delegation (OAuth with user consent)** in the following scenarios:
94+
Use user delegation (OAuth with user consent) in the following scenarios:
9595

96-
- Build applications that act on behalf of human users
97-
- Create interactive apps where users sign in with their own credentials
98-
- Implement features that require user-specific permissions
99-
- Build apps that respect user's individual access rights
96+
- Build applications that act for human users.
97+
- Create interactive apps where users sign in with their own credentials.
98+
- Implement features that require user-specific permissions.
99+
- Build apps that respect users' individual access rights.
100100

101-
### How do I authenticate with both Azure DevOps Server and Azure DevOps Services?
101+
### How do I authenticate with both Azure DevOps Services and Azure DevOps Server?
102102

103103
The best practice is to create separate authentication paths:
104104

105105
- **Azure DevOps Services**: Use Microsoft Entra ID OAuth.
106106
- **Azure DevOps Server**: Use .NET client libraries with Windows Authentication or personal access tokens.
107107

108-
Use the `requestContext` method to detect the service type and apply the appropriate authentication method.
108+
Use the `requestContext` method to detect the service type, and apply the appropriate authentication method.
109109

110110
### Why can't my service account access Azure DevOps APIs?
111-
111+
112112
Here are some common issues that can affect service account access:
113113

114-
- **Service account not "materialized"**: Use correct sign in method. Service accounts need interactive sign-in permissions or proper Microsoft Entra ID registration.
115-
- **Insufficient permissions**: Ensure the service account has appropriate Azure DevOps permissions.
114+
- **Service account not "materialized"**: Use the correct sign-in method. Service accounts need interactive sign-in permissions or proper Microsoft Entra ID registration.
115+
- **Insufficient permissions**: Ensure that the service account has appropriate Azure DevOps permissions.
116116
- **Authentication method**: Use service principals or managed identities instead of trying to authenticate as a service account.
117117

118118
### How do I migrate from personal access tokens to modern authentication?
119119

120-
Complete the following steps:
120+
Follow these steps:
121121

122122
1. Identify current personal access token usage in your applications.
123123

@@ -134,17 +134,15 @@ Complete the following steps:
134134

135135
## Implementation procedures
136136

137-
After you choose the authentication method for your scenario, complete the implementation:
137+
After you choose the authentication method for your scenario, finish the implementation:
138138

139139
- **New applications**: [Build Azure DevOps integrations with Microsoft Entra OAuth apps](entra-oauth.md)
140-
141140
- **Service applications**: [Use service principals and managed identities in Azure DevOps](service-principal-managed-identity.md)
142-
143141
- **Personal scripts**: [Use personal access tokens](../../../organizations/accounts/use-personal-access-tokens-to-authenticate.md)
144142

145143
## Related content
146144

147145
- [OAuth 2.0 for Azure DevOps](oauth.md)
148146
- [Azure DevOps Services REST API reference](/rest/api/azure/devops)
149147
- [Security and identity in Azure DevOps](../../../organizations/security/about-security-identity.md)
150-
- [Azure DevOps data protection overview](../../../organizations/security/data-protection.md)
148+
- [Azure DevOps data protection overview](../../../organizations/security/data-protection.md)

0 commit comments

Comments
 (0)