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
Copy file name to clipboardExpand all lines: articles/deployment-environments/how-to-authenticate.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,20 @@
1
1
---
2
2
title: Authenticate to Azure Deployment Environments REST APIs
3
-
description: Learn how to authenticate to Azure Deployment Environments REST APIs by using Microsoft Entra ID.
3
+
description: Learn how to authenticate to Azure Deployment Environments REST APIs as administrator or developer, by using the Azure CLI.
4
4
ms.service: azure-deployment-environments
5
5
ms.custom: build-2023
6
-
ms.topic: conceptual
6
+
ms.topic: concept-article
7
7
ms.author: rosemalcolm
8
8
author: RoseHJM
9
-
ms.date: 11/22/2023
9
+
ms.date: 01/31/2025
10
+
11
+
#customer intent: As a developer, I want to learn how to authenticate to Microsoft Dev Box REST APIs, so that I can securely interact with Microsoft Dev Box services.
10
12
---
11
13
12
14
# Authenticate to Azure Deployment Environments REST APIs
13
15
16
+
In this article, you'll learn how to authenticate to Microsoft Dev Box REST APIs using the Azure CLI. Authentication is a crucial step for accessing both administrator (control plane) and developer (data plane) APIs. This guide walks you through retrieving an access token from Microsoft Entra ID, understanding the token's structure and validity, and using the bearer token to access REST APIs. By following these steps, you can securely interact with Microsoft Dev Box services.
17
+
14
18
> [!TIP]
15
19
> 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).
16
20
@@ -30,7 +34,7 @@ az login
30
34
31
35
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.
32
36
33
-
Next, set the correct subscription context. If you authenticate from an incorrect subscription or tenant, you might receive unexpected **403 Forbidden** errors.
37
+
Next, set the correct subscription context. If you authenticate from an incorrect subscription or tenant, you might receive unexpected *403 Forbidden* errors.
34
38
35
39
```azurecli
36
40
az account set --subscription <subscription_id>
@@ -74,6 +78,6 @@ The token is a Base64 string. The token is valid for at least five minutes. The
74
78
75
79
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.
76
80
77
-
## Next steps
81
+
## Related content
78
82
79
-
-[Review Microsoft Entra ID fundamentals](../../articles/active-directory/fundamentals/whatis.md)
83
+
- Review [Microsoft Entra ID fundamentals](../../articles/active-directory/fundamentals/whatis.md)
#Customer intent: As a platform engineer, I want to install the devcenter extension so that I can create Deployment Environments resources from the command line.
13
14
---
14
15
@@ -74,6 +75,6 @@ You might find the following commands useful while you work with the devcenter e
74
75
az devcenter admin --help
75
76
```
76
77
77
-
## Next steps
78
+
## Related content
78
79
79
80
For complete command listings, see the [Microsoft Dev Box and Azure Deployment Environments Azure CLI documentation](https://aka.ms/CLI-reference).
Copy file name to clipboardExpand all lines: articles/dev-box/how-to-authenticate.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ ms.date: 01/31/2025
11
11
---
12
12
# Authenticating to Microsoft Dev Box REST APIs
13
13
14
-
In this article, you will learn how to authenticate to Microsoft Dev Box REST APIs using the Azure CLI. Authentication is a crucial step for accessing both administrator (control plane) and developer (data plane) APIs. This guide will walk you through retrieving an access token from Microsoft Entra ID, understanding the token's structure and validity, and using the bearer token to access REST APIs. By following these steps, you can securely interact with Microsoft Dev Box services.
14
+
In this article, you'll learn how to authenticate to Microsoft Dev Box REST APIs using the Azure CLI. Authentication is a crucial step for accessing both administrator (control plane) and developer (data plane) APIs. This guide walks you through retrieving an access token from Microsoft Entra ID, understanding the token's structure and validity, and using the bearer token to access REST APIs. By following these steps, you can securely interact with Microsoft Dev Box services.
15
15
16
16
> [!TIP]
17
17
> 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-project-admin.md) and [configuring Dev Box users](./how-to-dev-box-user.md).
@@ -33,7 +33,7 @@ az login
33
33
34
34
The command opens a browser window to the Microsoft Entra authentication page. It requires you to give your Microsoft Entra user ID and password.
35
35
36
-
Next, set the correct subscription context. If you authenticate from an incorrect subscription or tenant, you might receive unexpected 403 Forbidden errors.
36
+
Next, set the correct subscription context. If you authenticate from an incorrect subscription or tenant, you might receive unexpected *403 Forbidden* errors.
37
37
38
38
```azurecli
39
39
az account set --subscription <subscription_id>
@@ -69,7 +69,7 @@ After authentication is successful, Microsoft Entra ID returns an access token f
69
69
}
70
70
```
71
71
72
-
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.
72
+
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.
73
73
74
74
> [!TIP]
75
75
> 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.
0 commit comments