Skip to content

Commit 1ec616d

Browse files
authored
Merge pull request #259377 from cdpark/refresh-authenticate-api
Freshness pass 167585: Azure Deployment Environments -- Authenticate to REST APIs
2 parents f06a842 + fb7e6e5 commit 1ec616d

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,46 @@
11
---
22
title: Authenticate to Azure Deployment Environments REST APIs
3-
description: Learn how to authenticate to Azure Deployment Environments REST APIs.
3+
description: Learn how to authenticate to Azure Deployment Environments REST APIs by using Microsoft Entra ID.
44
ms.service: deployment-environments
55
ms.custom: ignite-2022, build-2023
66
ms.topic: conceptual
77
ms.author: chrismiller
88
author: chrismiller
9-
ms.date: 09/07/2023
9+
ms.date: 11/22/2023
1010
---
11-
# Authenticating to Azure Deployment Environments REST APIs
1211

13-
> [!TIP]
14-
> Before authenticating, ensure that the user or identity has the appropriate permissions to perform the desired action. For more information, see [configuring project admins](./how-to-configure-project-admin.md) and [configuring environment users](./how-to-configure-deployment-environments-user.md).
12+
# Authenticate to Azure Deployment Environments REST APIs
1513

14+
> [!TIP]
15+
> Before authenticating, ensure that the user or identity has the appropriate permissions to perform the desired action. For more information, see [Provide access for dev team leads](./how-to-configure-project-admin.md) and [Provide access for developers](./how-to-configure-deployment-environments-user.md).
1616
1717
<a name='using-azure-ad-authentication-for-rest-apis'></a>
1818

19-
## Using Microsoft Entra authentication for REST APIs
19+
## Use Microsoft Entra ID authentication for REST APIs
2020

21-
Use the following procedures to authenticate with Microsoft Entra ID. You can follow along in [Azure Cloud Shell](../../articles/cloud-shell/quickstart.md), on an Azure virtual machine, or on your local machine.
21+
Use the following procedures to access Azure Deployment Environments REST APIs by using Microsoft Entra ID. You can follow along in [Azure Cloud Shell](../../articles/cloud-shell/quickstart.md), on an Azure virtual machine, or on your local machine.
2222

23-
### Sign in to the user's Azure subscription
23+
### Sign in to your Azure subscription
2424

2525
Start by authenticating with Microsoft Entra ID by using the Azure CLI. This step isn't required in Azure Cloud Shell.
2626

2727
```azurecli
2828
az login
2929
```
3030

31-
The command opens a browser window to the Microsoft Entra authentication page. It requires you to give your Microsoft Entra user ID and password.
31+
The command opens a browser window to the Microsoft Azure authentication page, where you can choose an account. The page requires you to give your Microsoft Entra ID username and password.
3232

33-
Next, set the correct subscription context. If you authenticate from an incorrect subscription or tenant you may receive unexpected 403 Forbidden errors.
33+
Next, set the correct subscription context. If you authenticate from an incorrect subscription or tenant, you might receive unexpected **403 Forbidden** errors.
3434

3535
```azurecli
3636
az account set --subscription <subscription_id>
3737
```
3838

39-
4039
<a name='retrieve-the-azure-ad-access-token'></a>
4140

42-
### Retrieve the Microsoft Entra access token
41+
### Retrieve the Microsoft Entra ID access token
4342

44-
Use the Azure CLI to acquire an access token for the Microsoft Entra authenticated user.
45-
Note that the resource ID is different depending on if you are accessing administrator (control plane) APIs or developer (data plane) APIs.
43+
Use the Azure CLI to acquire an access token for the Microsoft Entra ID authenticated user. The resource ID is different depending on if you access administrator (control plane) APIs or developer (data plane) APIs.
4644

4745
For administrator APIs, use the following command:
4846
```azurecli-interactive
@@ -54,7 +52,7 @@ For developer APIs, use the following command:
5452
az account get-access-token --resource https://devcenter.azure.com
5553
```
5654

57-
After authentication is successful, Microsoft Entra ID returns an access token for current Azure subscription:
55+
After authentication is successful, Microsoft Entra ID returns an access token for the current Azure subscription:
5856

5957
```json
6058
{
@@ -66,14 +64,16 @@ After authentication is successful, Microsoft Entra ID returns an access token f
6664
}
6765
```
6866

69-
The token is a Base64 string. The token is valid for at least 5 minutes with the maximum of 90 minutes. The expiresOn defines the actual token expiration time.
67+
The token is a Base64 string. The token is valid for at least five minutes. The maximum duration is 90 minutes. The `expiresOn` defines the actual token expiration time.
7068

7169
> [!TIP]
72-
> Developer API tokens for the service are encrypted and cannot be decoded using JWT decoding tools. They can only be processed by the service.
70+
> Developer API tokens for the service are encrypted and can't be decoded using JWT decoding tools. They can only be processed by the service.
7371
7472

75-
### Using a bearer token to access REST APIs
76-
To access REST APIs, you must set the Authorization header on your request. The header value should be the string `Bearer` followed by a space and the token you received in the previous step.
73+
### Use a bearer token to access REST APIs
74+
75+
To access REST APIs, you must set the authorization header on your request. The header value should be the string `Bearer` followed by a space and the token you received in the previous step.
7776

7877
## Next steps
79-
- Review [Microsoft Entra fundamentals](../../articles/active-directory/fundamentals/whatis.md).
78+
79+
- [Review Microsoft Entra ID fundamentals](../../articles/active-directory/fundamentals/whatis.md)

0 commit comments

Comments
 (0)