|
1 | 1 | ---
|
2 |
| -ms.topic: how-to |
3 |
| -title: Building a Microsoft Entra OAuth app for Azure DevOps |
| 2 | +title: Building Azure DevOps integrations with Microsoft Entra OAuth apps |
4 | 3 | description: Use Microsoft Entra authentication to integrate with Azure DevOps Services.
|
5 | 4 | ms.assetid: 19285121-1805-4421-B7C4-63784C9A7CFA
|
6 | 5 | ms.subservice: azure-devops-security
|
| 6 | +ms.topic: conceptual |
7 | 7 | monikerRange: 'azure-devops'
|
8 | 8 | ms.author: chcomley
|
9 | 9 | author: chcomley
|
10 |
| -ms.date: 10/28/2024 |
| 10 | +ms.date: 01/08/2025 |
11 | 11 | ---
|
12 | 12 |
|
13 |
| -# Building for Azure DevOps with Microsoft Entra OAuth Apps |
| 13 | +# Build Azure DevOps integrations with Microsoft Entra OAuth apps |
14 | 14 |
|
15 |
| -## Entra OAuth Tokens |
16 |
| -The Microsoft Identity platform offers many ways to authenticate users via [the OAuth 2.0 protocol](/entra/identity-platform/v2-protocols). In these docs, we use OAuth tokens to colloquially refer to [on-behalf-of user flows](/entra/identity-platform/v2-oauth2-on-behalf-of-flow), also known as [delegated flows](/entra/identity-platform/delegated-access-primer), for apps that request tokens to perform actions for their users. The rest of this guide offers helpful resources for these app developers. |
| 15 | +[!INCLUDE [version-eq-azure-devops](../../../includes/version-eq-azure-devops.md)] |
| 16 | + |
| 17 | +This guide provides information and links to more information on building a Microsoft Entra OAuth app for Azure DevOps. Microsoft Entra ID offers robust identity and access management capabilities, which allow you to authenticate users and perform actions on their behalf using OAuth tokens. Use this information to apply Microsoft Entra OAuth tokens for various app flows, including delegated access and service principal-based access. |
| 18 | + |
| 19 | +## Use Microsoft Entra OAuth tokens |
| 20 | + |
| 21 | +The Microsoft identity platform offers many ways to authenticate users via [the OAuth 2.0 protocol](/entra/identity-platform/v2-protocols). In these docs, we use OAuth tokens to colloquially refer to [on-behalf-of user flows](/entra/identity-platform/v2-oauth2-on-behalf-of-flow), also known as [delegated flows](/entra/identity-platform/delegated-access-primer), for apps that request tokens to perform actions for their users. The rest of this guide offers helpful resources for these app developers. |
17 | 22 |
|
18 | 23 | Another common app flow we support is building [on-behalf-of app using service principals and managed identities](service-principal-managed-identity.md).
|
19 |
| -Entra tokens can also be used for [ad-hoc requests with the Azure CLI](entra.md#acquire-user-tokens-in-azure-cli) or [git operations through the Git Credential Manager](entra.md#git-operations-with-git-credential-manager). |
| 24 | +Microsoft Entra tokens can also be used for [ad-hoc requests with the Azure CLI](entra.md#acquire-user-tokens-in-azure-cli) or [git operations through the Git Credential Manager](entra.md#git-operations-with-git-credential-manager). |
20 | 25 |
|
21 | 26 | > [!IMPORTANT]
|
22 | 27 | > When creating a new OAuth 2.0 app, start here with Microsoft Entra OAuth apps, as [Azure DevOps OAuth apps](azure-devops-oauth.md) are planned for deprecation in 2026. [Learn more in our blog post](https://devblogs.microsoft.com/devops/no-new-azure-devops-oauth-apps-beginning-february-2025/).
|
23 | 28 |
|
24 |
| -## Helpful resources |
| 29 | +## Resources for developers |
25 | 30 |
|
26 |
| -### For developers |
27 |
| -* [Quickstart: Register an application with the Microsoft identity platform](/entra/identity-platform/quickstart-register-app) |
28 |
| -* [Add permissions to access Microsoft Graph](/entra/identity-platform/quickstart-configure-app-access-web-apis#add-permissions-to-access-microsoft-graph): Useful to learn how to add delegated permissions from an Azure resource. Instead of Microsoft Graph, select `Azure DevOps` from the list of resources instead. |
29 |
| -* [Scopes and permissions in the Microsoft identity platform](/entra/identity-platform/scopes-oidc): Read up on the `.default` scope. See the scopes available for Azure DevOps in [our list of scopes](oauth.md#scopes). |
30 |
| -* [Requesting permissions through consent](/entra/identity-platform/consent-types-developer) |
31 |
| -* [Authentication libraries](/entra/identity-platform/reference-v2-libraries) and [code samples](/entra/identity-platform/sample-v2-code?tabs=apptype) |
32 |
| -* [Manage personal access tokens via API](../../../organizations/accounts/manage-personal-access-tokens-via-api.md): Using the PAT lifecycle management APIs requires Microsoft Entra tokens and our docs and the [associated sample app](https://github.com/microsoft/azure-devops-auth-samples/tree/master/PersonalAccessTokenAPIAppSample) might be a helpful example for setting up a Microsoft Entra app to use Azure DevOps REST APIs. |
33 |
| -* [Support and help options for developers](/entra/identity-platform/developer-support-help-options) |
| 31 | +* [Register an application with the Microsoft identity platform](/entra/identity-platform/quickstart-register-app) |
| 32 | +* [Add permissions for access to Microsoft Graph](/entra/identity-platform/quickstart-configure-app-access-web-apis#add-permissions-to-access-microsoft-graph): Learn how to add delegated permissions from an Azure resource. Instead of Microsoft Graph, select `Azure DevOps` from the list of resources. |
| 33 | +* [Read about scopes and permissions in the Microsoft identity platform](/entra/identity-platform/scopes-oidc): Understand the `.default` scope. See the scopes available for Azure DevOps in [our list of scopes](oauth.md#scopes). |
| 34 | +* [Request permissions through consent](/entra/identity-platform/consent-types-developer) |
| 35 | +* [Use authentication libraries](/entra/identity-platform/reference-v2-libraries) and [code samples](/entra/identity-platform/sample-v2-code?tabs=apptype) |
| 36 | +* [Manage personal access tokens via API](../../../organizations/accounts/manage-personal-access-tokens-via-api.md): Use the PAT lifecycle management APIs with Microsoft Entra tokens. Our docs and the [associated sample app](https://github.com/microsoft/azure-devops-auth-samples/tree/master/PersonalAccessTokenAPIAppSample) provide examples for setting up a Microsoft Entra app to use Azure DevOps REST APIs. |
| 37 | +* [Explore support and help options for developers](/entra/identity-platform/developer-support-help-options) |
34 | 38 |
|
35 |
| -### For admins |
36 |
| -* [What is application management in Microsoft Entra ID?](/entra/identity/enterprise-apps/what-is-application-management) |
37 |
| -* [Quickstart: Add an enterprise application](/entra/identity/enterprise-apps/add-application-portal) |
38 |
| -* [Consent experience for applications in Microsoft Entra ID](/entra/identity-platform/application-consent-experience) |
| 39 | +### Resources for admins |
| 40 | + |
| 41 | +* [Understand application management in Microsoft Entra ID](/entra/identity/enterprise-apps/what-is-application-management) |
| 42 | +* [Add an enterprise application](/entra/identity/enterprise-apps/add-application-portal) |
| 43 | +* [Explore the consent experience for applications in Microsoft Entra ID](/entra/identity-platform/application-consent-experience) |
| 44 | + |
| 45 | +## Tips for building & migrating |
39 | 46 |
|
40 |
| -## Building & migrating tips |
41 | 47 | > [!NOTE]
|
42 |
| -> Microsoft Entra OAuth apps doesn't natively support MSA users for Azure DevOps REST APIs. If you are building an app that must cater to MSA users or supports both Microsoft Entra and MSA users, [Azure DevOps OAuth apps](azure-devops-oauth.md) remains your best option. We are currently working on native support for MSA users through Microsoft Entra OAuth. |
| 48 | +> Microsoft Entra OAuth apps don't natively support Microsoft account (MSA) users for Azure DevOps REST APIs. If you're building an app that must cater to MSA users or support both Microsoft Entra and MSA users, [Azure DevOps OAuth apps](azure-devops-oauth.md) remain your best option. We're currently working on native support for MSA users through Microsoft Entra OAuth. |
43 | 49 |
|
44 |
| -* **Good-to-know Azure DevOps IDs:** |
| 50 | +* **Important Azure DevOps IDs:** |
45 | 51 | * Microsoft Entra resource identifier: `499b84ac-1321-427f-aa17-267ca6975798`
|
46 |
| - * Resource Uri: `https://app.vssps.visualstudio.com` |
| 52 | + * Resource URI: `https://app.vssps.visualstudio.com` |
47 | 53 | * Use the `.default` scope when requesting a token with all scopes that the app is permissioned for.
|
48 |
| -* When migrating an existing app, you may be using Azure DevOps user identifiers that don't exist in Microsoft Entra. Use the [ReadIdentities API](/rest/api/azure/devops/ims/identities/read-identities) to resolve and match the different identities in use by each identity provider. |
| 54 | +* When you migrate an existing app, you might use Azure DevOps user identifiers that don't exist in Microsoft Entra. Use the [ReadIdentities API](/rest/api/azure/devops/ims/identities/read-identities) to resolve and match the different identities used by each identity provider. |
| 55 | + |
| 56 | +## Related articles |
49 | 57 |
|
| 58 | +- [Authenticate to Azure DevOps with Microsoft Entra](entra.md) |
| 59 | +- [Use service principals & managed identities in Azure DevOps](service-principal-managed-identity.md) |
0 commit comments