Skip to content

Commit e22b248

Browse files
Merge pull request #231180 from tamram/tamram23-0317
add resource ID for MSAL calls back to auth docs
2 parents d9b1a40 + 1990de4 commit e22b248

File tree

3 files changed

+42
-22
lines changed

3 files changed

+42
-22
lines changed

articles/storage/blobs/authorize-access-azure-active-directory.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: jimmart-dev
66

77
ms.service: storage
88
ms.topic: conceptual
9-
ms.date: 02/09/2023
9+
ms.date: 03/17/2023
1010
ms.author: jammart
1111
ms.subservice: common
1212
---
@@ -39,6 +39,13 @@ To learn about how to access data in the Azure portal with an Azure AD account,
3939

4040
### Use Azure AD to authorize access in application code
4141

42+
To authorize access to Azure Storage with Azure AD, you can use one of the following client libraries to acquire an OAuth 2.0 token:
43+
44+
- The Azure Identity client library is recommended for most development scenarios.
45+
- The [Microsoft Authentication Library (MSAL)](../../active-directory/develop/msal-overview.md) may be suitable for certain advanced scenarios.
46+
47+
#### Azure Identity client library
48+
4249
The Azure Identity client library simplifies the process of getting an OAuth 2.0 access token for authorization with Azure Active Directory (Azure AD) via the [Azure SDK](https://github.com/Azure/azure-sdk). The latest versions of the Azure Storage client libraries for .NET, Java, Python, JavaScript, and Go integrate with the Azure Identity libraries for each of those languages to provide a simple and secure means to acquire an access token for authorization of Azure Storage requests.
4350

4451
An advantage of the Azure Identity client library is that it enables you to use the same code to acquire the access token whether your application is running in the development environment or in Azure. The Azure Identity client library returns an access token for a security principal. When your code is running in Azure, the security principal may be a managed identity for Azure resources, a service principal, or a user or group. In the development environment, the client library provides an access token for either a user or a service principal for testing purposes.
@@ -47,7 +54,18 @@ The access token returned by the Azure Identity client library is encapsulated i
4754

4855
[!INCLUDE [storage-auth-language-table](../../../includes/storage-auth-language-table.md)]
4956

50-
Authorizing blob data operations with Azure AD is supported only for REST API versions 2017-11-09 and later. For more information, see [Versioning for the Azure Storage services](/rest/api/storageservices/versioning-for-the-azure-storage-services#specifying-service-versions-in-requests).
57+
#### Microsoft Authentication Library (MSAL)
58+
59+
While Microsoft recommends using the Azure Identity client library when possible, the MSAL library may be appropriate to use in certain advanced scenarios. For more information, see [Learn about MSAL](../../active-directory/develop/msal-overview.md).
60+
61+
When you use MSAL to acquire an OAuth token for access to Azure Storage, you need to provide an Azure AD resource ID. The Azure AD resource ID indicates the audience for which a token that is issued can be used to provide access to an Azure resource. In the case of Azure Storage, the resource ID may be specific to a single storage account, or it may apply to any storage account.
62+
63+
The following table describes the values that you can provide for the resource ID. The resource ID for Azure Storage is the same for all public and sovereign clouds:
64+
65+
| Resource ID | Description |
66+
|---|---|
67+
| `https://<account>.blob.core.windows.net` | The service endpoint for a given storage account. Use this value to acquire a token for authorizing requests to that specific Azure Storage account and service only. Replace the value in brackets with the name of your storage account. |
68+
| `https://storage.azure.com/` | Use to acquire a token for authorizing requests to any Azure Storage account. |
5169

5270
## Assign Azure roles for access rights
5371

@@ -125,6 +143,8 @@ Azure CLI and PowerShell support signing in with Azure AD credentials. After you
125143

126144
[!INCLUDE [Blob Storage feature support in Azure Storage accounts](../../../includes/azure-storage-feature-support.md)]
127145

146+
Authorizing blob data operations with Azure AD is supported only for REST API versions 2017-11-09 and later. For more information, see [Versioning for the Azure Storage services](/rest/api/storageservices/versioning-for-the-azure-storage-services#specifying-service-versions-in-requests).
147+
128148
## Next steps
129149

130150
- [Authorize access to data in Azure Storage](../common/authorize-data-access.md)

articles/storage/queues/authorize-access-azure-active-directory.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: jimmart-dev
66

77
ms.service: storage
88
ms.topic: conceptual
9-
ms.date: 02/09/2023
9+
ms.date: 03/17/2023
1010
ms.author: jammart
1111
ms.subservice: common
1212
---
@@ -37,6 +37,13 @@ To learn about how to access data in the Azure portal with an Azure AD account,
3737

3838
### Use Azure AD to authorize access in application code
3939

40+
To authorize access to Azure Storage with Azure AD, you can use one of the following client libraries to acquire an OAuth 2.0 token:
41+
42+
- The Azure Identity client library is recommended for most development scenarios.
43+
- The [Microsoft Authentication Library (MSAL)](../../active-directory/develop/msal-overview.md) may be suitable for certain advanced scenarios.
44+
45+
#### Azure Identity client library
46+
4047
The Azure Identity client library simplifies the process of getting an OAuth 2.0 access token for authorization with Azure Active Directory (Azure AD) via the [Azure SDK](https://github.com/Azure/azure-sdk). The latest versions of the Azure Storage client libraries for .NET, Java, Python, JavaScript, and Go integrate with the Azure Identity libraries for each of those languages to provide a simple and secure means to acquire an access token for authorization of Azure Storage requests.
4148

4249
An advantage of the Azure Identity client library is that it enables you to use the same code to acquire the access token whether your application is running in the development environment or in Azure. The Azure Identity client library returns an access token for a security principal. When your code is running in Azure, the security principal may be a managed identity for Azure resources, a service principal, or a user or group. In the development environment, the client library provides an access token for either a user or a service principal for testing purposes.
@@ -45,7 +52,18 @@ The access token returned by the Azure Identity client library is encapsulated i
4552

4653
[!INCLUDE [storage-auth-language-table](../../../includes/storage-auth-language-table.md)]
4754

48-
Authorizing queue data operations with Azure AD is supported only for REST API versions 2017-11-09 and later. For more information, see [Versioning for the Azure Storage services](/rest/api/storageservices/versioning-for-the-azure-storage-services#specifying-service-versions-in-requests).
55+
#### Microsoft Authentication Library (MSAL)
56+
57+
While Microsoft recommends using the Azure Identity client library when possible, the MSAL library may be appropriate to use in certain advanced scenarios. For more information, see [Learn about MSAL](../../active-directory/develop/msal-overview.md).
58+
59+
When you use MSAL to acquire an OAuth token for access to Azure Storage, you need to provide an Azure AD resource ID. The Azure AD resource ID indicates the audience for which a token that is issued can be used to provide access to an Azure resource. In the case of Azure Storage, the resource ID may be specific to a single storage account, or it may apply to any storage account.
60+
61+
The following table describes the values that you can provide for the resource ID. The resource ID for Azure Storage is the same for all public and sovereign clouds:
62+
63+
| Resource ID | Description |
64+
|---|---|
65+
| `https://<account>.queue.core.windows.net` | The service endpoint for a given storage account. Use this value to acquire a token for authorizing requests to that specific Azure Storage account and service only. Replace the value in brackets with the name of your storage account. |
66+
| `https://storage.azure.com/` | Use to acquire a token for authorizing requests to any Azure Storage account. |
4967

5068
## Assign Azure roles for access rights
5169

includes/storage-resource-id-include.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)