{"id":3484,"date":"2025-09-10T11:24:47","date_gmt":"2025-09-10T18:24:47","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sdk\/?p=3484"},"modified":"2025-09-10T11:24:47","modified_gmt":"2025-09-10T18:24:47","slug":"azure-storage-apis-gain-entra-id-and-rbac-support","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sdk\/azure-storage-apis-gain-entra-id-and-rbac-support\/","title":{"rendered":"Azure Storage APIs gain Entra ID and RBAC support"},"content":{"rendered":"<h3>API Updates<\/h3>\n<p>To align with security best practices, Microsoft Entra ID and RBAC (role-based access control) support is now generally available for the following Azure Storage data plane APIs:<\/p>\n<ul>\n<li><a href=\"https:\/\/learn.microsoft.com\/rest\/api\/storageservices\/get-account-information?tabs=microsoft-entra-id#authorization\">Get Account Information<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/rest\/api\/storageservices\/get-container-acl?tabs=microsoft-entra-id#authorization\">Get Container ACL<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/rest\/api\/storageservices\/set-container-acl?tabs=microsoft-entra-id#authorization\">Set Container ACL<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/rest\/api\/storageservices\/get-queue-acl?tabs=microsoft-entra-id#authorization\">Get Queue ACL<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/rest\/api\/storageservices\/set-queue-acl?tabs=microsoft-entra-id#authorization\">Set Queue ACL<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/rest\/api\/storageservices\/get-table-acl?tabs=microsoft-entra-id#authorization\">Get Table ACL<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/rest\/api\/storageservices\/set-table-acl?tabs=microsoft-entra-id#authorization\">Set Table ACL<\/a><\/li>\n<\/ul>\n<p>To learn more, see <a href=\"https:\/\/learn.microsoft.com\/rest\/api\/storageservices\/authorize-with-azure-active-directory#permissions-for-blob-service-operations\">Authorize with Microsoft Entra ID (REST API) &#8211; Azure Storage<\/a>.<\/p>\n<p>These APIs now support OAuth 2.0-based authentication via Microsoft Entra ID with Azure Storage. As part of this enhancement, the REST API responses for unauthorized access were changed.<\/p>\n<p>Previously, if you tried to use these APIs with OAuth, we returned an HTTP 404 status code. Now, if you use these APIs with OAuth but don&#8217;t have the right permissions (for example, Get Account Information requires Azure RBAC action <code>Microsoft.Storage\/storageAccounts\/blobServices\/getInfo\/action<\/code>), we return an HTTP 403 status code (unauthorized access). If you send an anonymous request for <a href=\"https:\/\/learn.microsoft.com\/rest\/api\/storageservices\/authorize-with-azure-active-directory#bearer-challenge\">bearer challenge<\/a>, we return an HTTP 401 status code, which is the same behavior as with the other APIs.<\/p>\n<p>If you took a dependency on an HTTP 404 error code for these operations, we recommend that you change your application code to support both 404 and 403 error codes. The best practice for checking unsupported APIs isn&#8217;t to take a dependency on error codes, but to refer to <a href=\"https:\/\/learn.microsoft.com\/rest\/api\/storageservices\/authorize-with-azure-active-directory\">Authorize with Microsoft Entra ID (REST API) &#8211; Azure Storage<\/a>.<\/p>\n<h3>Why You Should Default to OAuth<\/h3>\n<p>You should use OAuth as the default authentication method because it aligns with security best practices and provides a more secure and scalable way to manage access to resources. OAuth offers several advantages over SAS (Shared Access Signature) and account key authentication methods.<\/p>\n<p>OAuth provides token-based authentication, which allows for more granular access control and better security management. Tokens can be scoped to specific permissions and have expiration times, reducing the risk of long-term exposure of sensitive credentials. In contrast, SAS and account key methods rely on static keys that can be more vulnerable to unauthorized access and misuse. OAuth supports modern authentication protocols and integrates seamlessly with various identity providers, making it easier to implement and manage across different platforms and applications. It also allows for full auditability and monitoring for storage access governance. Learn more at <a href=\"https:\/\/www.microsoft.com\/security\/business\/security-101\/what-is-oauth?\">What Is OAuth? | Microsoft Security<\/a>.<\/p>\n<p>The Azure Identity library&#8217;s <code>DefaultAzureCredential<\/code> API further simplifies OAuth usage by providing a unified way to authenticate across different environments. It automatically handles the authentication flow, making it easier for you to integrate OAuth into your applications without having to manage multiple credential types.<\/p>\n<h3>Example Code Snippet for .NET<\/h3>\n<p>Here&#8217;s a short snippet demonstrating how to use the Azure Identity library&#8217;s <code>DefaultAzureCredential<\/code> API to authenticate and access Azure Storage APIs like Get Account Information:<\/p>\n<pre><code class=\"language-csharp\">using Azure.Identity; \r\nusing Azure.Storage.Blobs; \r\n\r\nvar credential = new DefaultAzureCredential(); \r\nvar blobServiceClient = new BlobServiceClient(new Uri(\"https:\/\/.blob.core.windows.net\"), credential); \r\n\r\n\/\/ Example: Get Account Information \r\nvar accountInfo = blobServiceClient.GetAccountInfo(); \r\nConsole.WriteLine($\"Account Kind: {accountInfo.AccountKind}, SKU: {accountInfo.SkuName}\"); <\/code><\/pre>\n<h3>Conclusion<\/h3>\n<p>The support for Microsoft Entra ID and RBAC brings these APIs in line with security best practices. We recommend you use OAuth with these APIs to attain more secure and scalable access management.<\/p>\n<h3>Resources<\/h3>\n<ul>\n<li><a href=\"https:\/\/learn.microsoft.com\/rest\/api\/storageservices\/authorize-with-azure-active-directory#permissions-for-blob-service-operations\">Authorize with Microsoft Entra ID (REST API) &#8211; Azure Storage<\/a><\/li>\n<li><a href=\"https:\/\/www.microsoft.com\/security\/business\/security-101\/what-is-oauth?\">What Is OAuth? | Microsoft Security<\/a><\/li>\n<\/ul>\n<h3>Help and Support<\/h3>\n<p>If you have questions, get answers from community experts in <a href=\"https:\/\/learn.microsoft.com\/answers\/tags\/125\/azure-blob-storage\">Microsoft Q&amp;A<\/a>. If you have a support plan and you need technical help, create a <a href=\"https:\/\/portal.azure.com\/#blade\/Microsoft_Azure_Support\/HelpAndSupportBlade\/newsupportrequest\">support request<\/a>:<\/p>\n<ul>\n<li>For Issue type, select Technical.<\/li>\n<li>For Subscription, select your subscription.<\/li>\n<li>For Service, select My services.<\/li>\n<li>For Service type, select the applicable service: either Blob Storage, Queue Storage, or Table Storage.<\/li>\n<li>For Resource, select the Azure resource you&#8217;re creating a support request for.<\/li>\n<li>For Summary, type a description of your issue.<\/li>\n<li>For Problem type, select Authentication and Authorization.<\/li>\n<li>For Problem subtype, select Issues using Azure AD (RBAC, ABAC, &amp; OAuth).<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>To align with security best practices, Microsoft Entra ID and RBAC support is now generally available for several Azure Storage data plane APIs.<\/p>\n","protected":false},"author":195644,"featured_media":3487,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[701,732,738],"class_list":["post-3484","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sdk","tag-net","tag-release","tag-storage"],"acf":[],"blog_post_summary":"<p>To align with security best practices, Microsoft Entra ID and RBAC support is now generally available for several Azure Storage data plane APIs.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/3484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/users\/195644"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/comments?post=3484"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/3484\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media\/3487"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media?parent=3484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/categories?post=3484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/tags?post=3484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}