Rediger

Assign an Azure role for access to blob data

Assign an Azure role for access to blob data by using Azure role-based access control (Azure RBAC) and Microsoft Entra ID. Azure Storage built-in and custom roles help you grant least-privilege access to users, groups, and applications.

When you assign an Azure role to a Microsoft Entra security principal, you grant access to those resources for that security principal. A Microsoft Entra security principal can be a user, a group, an application service principal, or a managed identity for Azure resources.

To learn more about using Microsoft Entra ID to authorize access to blob data, see Authorize access to blobs using Microsoft Entra ID.

When you create an Azure Storage account, you aren't automatically assigned permissions to access data via Microsoft Entra ID. You must explicitly assign yourself an Azure role for Azure Storage. You can assign it at the level of your subscription, resource group, storage account, or container.

This article shows how to assign an Azure role for access to blob data in a storage account. To learn about assigning roles for management operations in Azure Storage, see Use the Azure Storage resource provider to access management resources.

Note

You can create custom Azure RBAC roles for granular access to blob data. For more information, see Azure custom roles.

Assign an Azure role

You can use the Azure portal, PowerShell, Azure CLI, or an Azure Resource Manager template to assign a role for data access.

  1. First, decide which roles you want to assign. To find a list of blob data access roles, see Azure built-in roles for blobs.

    Note

    To access blob data in the Azure portal by using Microsoft Entra credentials, a user must have the Azure Resource Manager Reader role, at a minimum, in addition to a data access role such as the Storage Blob Data Reader or Storage Blob Data Contributor role. See Data access from the Azure portal.

  2. Assign roles to users. To assign an Azure role, see Assign Azure roles using the Azure portal. While that article isn't specific to Azure Storage, the steps to assign roles are consistent for all Azure services.

When you assign roles or remove role assignments, it can take up to 10 minutes for changes to take effect. If you assign roles at the management group scope, it can take much longer. See Role assignment propagation delays for blob data access.

Note

If the storage account is locked with an Azure Resource Manager read-only lock, then the lock prevents the assignment of Azure roles that are scoped to the storage account or a container.

Next steps