Skip to content

Commit 78d0d56

Browse files
committed
Refresh, prioritize Entra, de-pri PATs
1 parent a1d60b0 commit 78d0d56

File tree

4 files changed

+1266
-307
lines changed

4 files changed

+1266
-307
lines changed

docs/integrate/get-started/authentication/entra.md

Lines changed: 79 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,104 @@
11
---
22
ms.topic: how-to
3-
title: Authenticate to Azure DevOps with Microsoft Entra ID access tokens
4-
description: Use Microsoft Entra authentication to access Azure DevOps Services.
3+
title: Authenticate to Azure DevOps with Microsoft Entra ID
4+
description: Use Microsoft Entra ID authentication for secure access to Azure DevOps Services with modern identity management capabilities.
55
ms.assetid: 19285121-1805-4421-B7C4-63784C9A7CFA
66
ms.subservice: azure-devops-security
7+
ai-usage: ai-assisted
78
monikerRange: 'azure-devops'
89
ms.author: chcomley
910
author: chcomley
10-
ms.date: 01/31/2025
11+
ms.date: 07/14/2025
1112
---
1213

13-
# Authenticate to Azure DevOps with Microsoft Entra
14+
# Authenticate to Azure DevOps with Microsoft Entra ID
1415

15-
[Microsoft Entra ID](/entra/fundamentals/whatis) is an identity and access management (IAM) platform that allows companies to manage organization membership and safeguard company resources. Many Azure DevOps enterprise customers choose to [connect their Azure DevOps organization to a Microsoft Entra ID tenant](../../../organizations/accounts/connect-organization-to-azure-ad.md) to support managing the large volume of users in their company and take advantage of other [security features that Microsoft Entra offers](../../../organizations/accounts/access-with-azure-ad.md).
16+
[!INCLUDE [version-eq-azure-devops](../../../includes/version-eq-azure-devops.md)]
17+
18+
> [!IMPORTANT]
19+
> **Microsoft Entra ID authentication is the recommended approach** for new applications integrating with Azure DevOps Services. It provides enhanced security, enterprise identity integration, and modern authentication capabilities.
20+
21+
This article explains the benefits of Microsoft Entra ID authentication and guides you through implementing it in your applications.
22+
23+
## Overview
24+
25+
[Microsoft Entra ID](/entra/fundamentals/whatis) is Microsoft's cloud-based identity and access management platform that lets organizations:
26+
27+
- **Manage user identities** and control access to resources
28+
- **Implement enterprise security policies** like multi-factor authentication and Conditional Access
29+
- **Integrate with thousands of applications** including Azure DevOps Services
30+
- **Provide single sign-on (SSO)** across Microsoft and non-Microsoft services
31+
32+
Many Azure DevOps enterprise customers [connect their Azure DevOps organization to Microsoft Entra ID](../../../organizations/accounts/connect-organization-to-azure-ad.md) to use these capabilities and [enhanced security features](../../../organizations/accounts/access-with-azure-ad.md).
1633

1734
> [!NOTE]
18-
> Microsoft Entra was once called [Azure Active Directory (Azure AD)](/entra/fundamentals/new-name), so you may still see references to Azure AD across Microsoft products. Active Directory may also be referenced as the on-premises equivalent of Microsoft Entra.
35+
> Microsoft Entra ID was previously known as [Azure Active Directory (Azure AD)](/entra/fundamentals/new-name). You might still see references in some Microsoft products and documentation.
36+
37+
## Authentication options
38+
39+
The [Microsoft Identity platform](/entra/identity-platform/) provides two primary authentication patterns for Azure DevOps access:
40+
41+
### User delegation (OAuth)
42+
**Best for**: Interactive applications that act on behalf of users
43+
44+
- Users sign in with their Microsoft Entra ID credentials
45+
- Applications receive delegated permissions to act as the signed-in user
46+
- Supports multi-factor authentication and Conditional Access policies
47+
- Ideal for web applications, desktop apps, and user-facing tools
48+
49+
**Get started**: [Microsoft Entra ID OAuth implementation](entra-oauth.md)
50+
51+
### Application identity (Service principals and managed identities)
52+
**Best for**: Background services and automation scenarios
53+
54+
- Applications authenticate using their own identity (not user credentials)
55+
- Suitable for CI/CD pipelines, background services, and automated tools
56+
- More secure for service-to-service communication
57+
- Supports both service principals and Azure managed identities
58+
59+
**Get started**: [Service principals and managed identities](service-principal-managed-identity.md)
60+
61+
## Benefits of Microsoft Entra ID authentication
1962

20-
Once connected, the [Microsoft Identity application platform](/entra/identity-platform/) that sits on top of Microsoft Entra ID can be used to register an application to access Azure tenants and define the permissions needed from Azure resources, including Azure DevOps.
63+
Microsoft Entra ID authentication provides significant advantages over legacy Azure DevOps authentication methods:
2164

22-
We support app development for:
23-
* [Microsoft Entra OAuth apps (on-behalf-of users)](entra-oauth.md)
24-
* [Microsoft Entra service principals and managed identities (on-behalf-of itself apps)](service-principal-managed-identity.md)
65+
### Enhanced security
66+
- **Short-lived tokens** (1 hour expiration) reduce risk from compromised credentials
67+
- **Conditional Access policies** protect against token theft and unauthorized access
68+
- **Multi-factor authentication** support for other security layers
69+
- **Advanced threat protection** with real-time risk assessment
2570

26-
## Azure DevOps-based auth vs. Entra-based auth
71+
### Enterprise integration
72+
- **Single sign-on** across Microsoft and non-Microsoft applications
73+
- **Centralized identity management** for users and applications
74+
- **Policy enforcement** at the organizational level
75+
- **Audit and compliance** capabilities for governance requirements
2776

28-
Many native Azure DevOps-based authentication (for example, [personal access tokens (PATs)](../../../organizations/accounts/use-personal-access-tokens-to-authenticate.md) or Azure DevOps OAuth apps) were created before Microsoft Entra. Microsoft Entra tokens offer a secure alternative, lasting only one hour before requiring a refresh. The authentication protocols for generating Entra tokens are more robust and secure. Security measures like [Conditional Access policies](../../../organizations/accounts/change-application-access-policies.md#cap-support-on-azure-devops) protect against token theft and replay attacks. Meanwhile, our native tokens sit outside Azure and don't have native support for concepts, like tenants or Conditional Access.
77+
### Developer experience
78+
- **Modern authentication libraries** (MSAL) with automatic token refresh
79+
- **Consistent identity platform** across all Microsoft services
80+
- **Rich documentation and samples** for quick implementation
81+
- **Active support and development** with regular feature updates
2982

30-
Tokens issued by each platform are also distinct. Microsoft Entra OAuth apps issue Microsoft Entra tokens, not Azure DevOps access tokens. These tokens can't be used interchangeably on each platform. If you are exploring migrating from Azure DevOps OAuth to Microsoft Entra OAuth, users must reauthorize for the new app.
83+
### Comparison with legacy methods
3184

32-
## Replace PATs with Microsoft Entra tokens
85+
| Feature | Microsoft Entra ID | Personal Access Tokens | Azure DevOps OAuth |
86+
|---------|-------------------|------------------------|-------------------|
87+
| **Token lifespan** | 1 hour (auto-refresh) | Up to 1 year | Configurable |
88+
| **Multi-factor authentication** | ✅ Native support | ❌ Not supported | ❌ Not supported |
89+
| **Conditional Access** | ✅ Full support | ❌ Not supported | ❌ Not supported |
90+
| **Enterprise policies** | ✅ Enforced | ⚠️ Limited | ⚠️ Limited |
91+
| **Audit logging** | ✅ Comprehensive | ⚠️ Basic | ⚠️ Basic |
92+
| **Future investment** | ✅ Active development | ⚠️ Maintenance mode | ❌ Deprecated |
3393

34-
Personal access tokens (PATs) are a popular form of Azure DevOps authentication due to their ease of creation and use. However, poor PAT management and storage can result in leaks and unauthorized access to your Azure DevOps organizations. Long-lived or over-scoped PATs increase the risk of damage from a leaked PAT. We encourage users to explore using Microsoft Entra tokens instead of PATs whenever possible.
94+
> [!IMPORTANT]
95+
> **Token compatibility**: Microsoft Entra ID tokens and Azure DevOps tokens aren't interchangeable. Applications migrating from Azure DevOps OAuth to Microsoft Entra ID OAuth require user reauthorization.
3596
36-
### Common PAT alternatives
97+
### Migration from legacy authentication
3798

38-
Due to their increasing risk, admins are increasingly requesting [security policies that restrict PAT creation](../../../organizations/accounts/manage-pats-with-policies-for-administrators.md). As a result, PATs are becoming a less viable alternative for accessing Azure DevOps programmatically. Outside of migrating any existing app development to the Microsoft Identity platform, we share some common use cases across Azure DevOps that historically rely on PATs and their recommended Microsoft Entra alternative.
99+
Organizations increasingly adopt [security policies that restrict Personal Access Token (PAT) creation](../../../organizations/accounts/manage-pats-with-policies-for-administrators.md) due to security risks. Microsoft Entra ID authentication provides secure alternatives for common PAT scenarios.
39100

40-
| PAT scenario | Entra alternative |
101+
| PAT scenario | Microsoft Entra alternative |
41102
|------------|------------|
42103
| Authenticate with Git Credential Manager (GCM) | GCM defaults to authenticating with PATs. Set the default credential type to `oauth`. Learn more on our [Git Credential Manager (GCM) page](../../../repos/git/set-up-credential-managers.md) . |
43104
| Authenticate in a build or release pipeline | Use a [service connection with Workload Identity Federation](../../../pipelines/library/connect-to-azure.md#create-an-azure-resource-manager-service-connection-that-uses-workload-identity-federation). |

0 commit comments

Comments
 (0)