Skip to content

Commit 1933b81

Browse files
Merge pull request #293945 from RoseHJM/mdb-freshness-jan-04
MDB - freshness Jan 04
2 parents 5391a73 + fdf605d commit 1933b81

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

articles/dev-box/how-to-authenticate.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
---
22
title: Authenticate to Microsoft Dev Box REST APIs
3-
description: Learn how to authenticate to Microsoft Dev Box REST APIs.
3+
description: Learn how to authenticate to Microsoft Dev Box REST APIs as administrator or developer, by using the Azure CLI.
44
ms.service: dev-box
5-
ms.topic: conceptual
5+
ms.topic: concept-article
66
ms.author: rosemalcolm
77
author: RoseHJM
8-
ms.date: 09/07/2023
8+
ms.date: 01/31/2025
9+
10+
#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.
911
---
1012
# Authenticating to Microsoft Dev Box REST APIs
1113

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.
15+
1216
> [!TIP]
1317
> 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).
1418
@@ -29,7 +33,7 @@ az login
2933

3034
The command opens a browser window to the Microsoft Entra authentication page. It requires you to give your Microsoft Entra user ID and password.
3135

32-
Next, set the correct subscription context. If you authenticate from an incorrect subscription or tenant you may 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.
3337

3438
```azurecli
3539
az account set --subscription <subscription_id>
@@ -41,7 +45,7 @@ az account set --subscription <subscription_id>
4145
### Retrieve the Microsoft Entra access token
4246

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

4650
For administrator APIs, use the following command:
4751
```azurecli-interactive
@@ -68,11 +72,12 @@ After authentication is successful, Microsoft Entra ID returns an access token f
6872
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.
6973

7074
> [!TIP]
71-
> Developer API tokens for the service are encrypted and cannot be decoded using JWT decoding tools. They can only be processed by the service.
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.
7276
7377

7478
### Using a bearer token to access REST APIs
7579
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.
7680

77-
## Next steps
81+
## Related content
82+
7883
- Review [Microsoft Entra fundamentals](../../articles/active-directory/fundamentals/whatis.md).

0 commit comments

Comments
 (0)