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/storage/files/storage-files-identity-assign-share-level-permissions.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,27 +19,27 @@ After you enable an identity source for your storage account, you must configure
19
19
20
20
## Choose how to assign share-level permissions
21
21
22
-
You configure share-level permissions on Azure file shares for Microsoft Entra users, groups, or service principals. Directory-level and file-level permissions are enforced through Windows access control lists (ACLs). Assign share-level permissions to the Entra identity that represents the user, group, or service principal needing access.
22
+
You configure share-level permissions on Azure file shares for Microsoft Entra users, groups, or service principals. Directory-level and file-level permissions are enforced through Windows access control lists (ACLs). Assign share-level permissions to the Microsoft Entra identity that represents the user, group, or service principal needing access.
23
23
24
-
Most users assign share-level permissions to specific Entra users or groups and use Windows ACLs for granular access control at the directory and file levels. This configuration is the most secure.
24
+
Most users assign share-level permissions to specific Microsoft Entra users or groups and use Windows ACLs for granular access control at the directory and file levels. This configuration is the most secure.
25
25
26
26
Use a [default share-level permission](#share-level-permissions-for-all-authenticated-identities) to grant role-based access to all authenticated identities in these scenarios:
27
27
28
28
- You're using Microsoft Entra Kerberos to authenticate cloud-only identities (preview).
29
-
- You can't sync your on-premises Active Directory Domain Services (AD DS) deployment to Microsoft Entra ID. Assigning a default share-level permission works around the sync requirement because you don't need to specify the permission to identities in Entra ID. Then you can use Windows ACLs for granular permission enforcement on your files and directories.
29
+
- You can't sync your on-premises Active Directory Domain Services (AD DS) deployment to Microsoft Entra ID. Assigning a default share-level permission works around the sync requirement because you don't need to specify the permission to identities in Microsoft Entra ID. Then you can use Windows ACLs for granular permission enforcement on your files and directories.
30
30
31
31
Identities that are tied to an Active Directory but aren't syncing to Microsoft Entra ID can also use the default share-level permission. This condition can include standalone Managed Service Accounts (sMSAs), group Managed Service Accounts (gMSAs), and computer accounts.
32
-
- The on-premises AD DS deployment that you're using is synced to an Entra ID deployment that's different from the one where the file share is deployed.
32
+
- The on-premises AD DS deployment that you're using is synced to a Microsoft Entra ID deployment that's different from the one where the file share is deployed.
33
33
34
-
This condition is typical when you're managing multitenant environments. By using a default share-level permission, you bypass the requirement for an Entra ID [hybrid identity](/entra/identity/hybrid/whatis-hybrid-identity). You can still use Windows ACLs on your files and directories for granular permission enforcement.
34
+
This condition is typical when you're managing multitenant environments. By using a default share-level permission, you bypass the requirement for a Microsoft Entra ID [hybrid identity](/entra/identity/hybrid/whatis-hybrid-identity). You can still use Windows ACLs on your files and directories for granular permission enforcement.
35
35
- You prefer to enforce authentication only by using Windows ACLs at the file and directory levels.
36
36
37
37
## Azure RBAC roles for Azure Files
38
38
39
39
Several built-in Azure role-based access control (RBAC) roles are intended for use with Azure Files. Some of these roles grant share-level permissions to users and groups. If you're using Azure Storage Explorer, you also need the [Reader and Data Access](../../role-based-access-control/built-in-roles.md#reader-and-data-access) role to read and access the Azure file share.
40
40
41
41
> [!NOTE]
42
-
> Because computer accounts don't have an identity in Entra ID, you can't configure Azure RBAC for them. However, computer accounts can access a file share by using a [default share-level permission](#share-level-permissions-for-all-authenticated-identities).
42
+
> Because computer accounts don't have an identity in Microsoft Entra ID, you can't configure Azure RBAC for them. However, computer accounts can access a file share by using a [default share-level permission](#share-level-permissions-for-all-authenticated-identities).
43
43
44
44
|**Built-in Azure RBAC role**|**Description**|
45
45
|---------|---------|
@@ -53,11 +53,11 @@ Several built-in Azure role-based access control (RBAC) roles are intended for u
## Share-level permissions for specific Entra users or groups
56
+
## Share-level permissions for specific Microsoft Entra users or groups
57
57
58
58
If you intend to use a specific Microsoft Entra user or group to access Azure file share resources, that identity must be a [hybrid identity](/entra/identity/hybrid/whatis-hybrid-identity) that exists in both on-premises AD DS and Microsoft Entra ID. Cloud-only identities must use a [default share-level permission](#share-level-permissions-for-all-authenticated-identities).
59
59
60
-
For example, if you have a user in Active Directory named [email protected] and you sync to Entra ID as [email protected] by using Microsoft Entra Connect Sync or Microsoft Entra Connect Cloud Sync, the user must have the share-level permissions assigned to [email protected] to access the file share. The same concept applies to groups and service principals.
60
+
For example, if you have a user in Active Directory named [email protected] and you sync to Microsoft Entra ID as [email protected] by using Microsoft Entra Connect Sync or Microsoft Entra Connect Cloud Sync, the user must have the share-level permissions assigned to [email protected] to access the file share. The same concept applies to groups and service principals.
61
61
62
62
> [!IMPORTANT]
63
63
> Assign permissions by explicitly declaring actions and data actions instead of using a wildcard (\*) character.
@@ -66,21 +66,21 @@ For example, if you have a user in Active Directory named [email protected]
66
66
67
67
For share-level permissions to work, you must take the following actions:
68
68
69
-
- If your identity source is AD DS or Microsoft Entra Kerberos, sync the users *and* the groups from your local Active Directory deployment to Entra ID by using either [Microsoft Entra Connect Sync](/entra/identity/hybrid/connect/how-to-connect-sync-whatis) or [Microsoft Entra Cloud Sync](/entra/identity/hybrid/cloud-sync/what-is-cloud-sync). Microsoft Entra Cloud Sync is a lightweight agent that you can install from the Microsoft Entra admin center.
69
+
- If your identity source is AD DS or Microsoft Entra Kerberos, sync the users *and* the groups from your local Active Directory deployment to Microsoft Entra ID by using either [Microsoft Entra Connect Sync](/entra/identity/hybrid/connect/how-to-connect-sync-whatis) or [Microsoft Entra Cloud Sync](/entra/identity/hybrid/cloud-sync/what-is-cloud-sync). Microsoft Entra Cloud Sync is a lightweight agent that you can install from the Microsoft Entra admin center.
70
70
- Add Active Directory-synced groups to the RBAC role so they can access your storage account.
71
71
72
72
> [!TIP]
73
73
> Optional: To migrate SMB server root folder permissions to RBAC permissions, use the `Move-OnPremSharePermissionsToAzureFileShare` PowerShell cmdlet from the [AzFilesHybrid module](https://github.com/Azure-Samples/azure-files-samples/tree/master/AzFilesHybrid). This cmdlet gets the directory permissions of the root directory of an on-premises file share and updates the RBAC definition on the Azure file share to grant access to users/groups listed in the root directory ACL.
74
74
>
75
75
> The cmdlet only converts the root directory into RBAC assignments. Users who have access to sub-files and directories without access to the root aren't added to RBAC. Also, the cmdlet grants the RBAC role that's equivalent to what's on the root. Users who have read-only access to the root but write access to some sub-files or directories will only get read access in RBAC. You need to manually adjust RBAC in those cases.
76
76
77
-
To grant share-level permissions, use the Azure portal, Azure PowerShell, or the Azure CLI to assign one of the built-in roles to the Entra ID identity of a user.
77
+
To grant share-level permissions, use the Azure portal, Azure PowerShell, or the Azure CLI to assign one of the built-in roles to the Microsoft Entra ID identity of a user.
78
78
79
79
Share-level permission changes usually take effect within 30 minutes, but in some cases they can take longer. Wait for permissions to propagate before you connect to the file share by using your credentials.
80
80
81
81
# [Portal](#tab/azure-portal)
82
82
83
-
To assign an Azure role to an Entra identity by using the [Azure portal](https://portal.azure.com), follow these steps:
83
+
To assign an Azure role to a Microsoft Entra identity by using the [Azure portal](https://portal.azure.com), follow these steps:
84
84
85
85
1. In the Azure portal, go to your file share, or [create an SMB file share](storage-how-to-create-file-share.md).
86
86
@@ -90,15 +90,15 @@ To assign an Azure role to an Entra identity by using the [Azure portal](https:/
90
90
91
91
1. In the **Add role assignment** pane, select the [appropriate built-in role](#azure-rbac-roles-for-azure-files) from the **Role** list.
92
92
93
-
1. Keep **Assign access to** at the default setting: **Microsoft Entra user, group, or service principal**. Select the target Entra identity by name or email address.
93
+
1. Keep **Assign access to** at the default setting: **Microsoft Entra user, group, or service principal**. Select the target Microsoft Entra identity by name or email address.
94
94
95
-
The selected Entra identity must be a hybrid identity and can't be a cloud-only identity. This requirement means that the same identity is also represented in AD DS.
95
+
The selected Microsoft Entra identity must be a hybrid identity and can't be a cloud-only identity. This requirement means that the same identity is also represented in AD DS.
96
96
97
97
1. Select **Save** to complete the role assignment operation.
98
98
99
99
# [Azure PowerShell](#tab/azure-powershell)
100
100
101
-
The following PowerShell sample shows how to assign an Azure role to an Entra identity, based on sign-in name. For more information about assigning Azure roles by using PowerShell, see [Add or remove Azure role assignments by using the Azure PowerShell module](../../role-based-access-control/role-assignments-powershell.md).
101
+
The following PowerShell sample shows how to assign an Azure role to a Microsoft Entra identity, based on sign-in name. For more information about assigning Azure roles by using PowerShell, see [Add or remove Azure role assignments by using the Azure PowerShell module](../../role-based-access-control/role-assignments-powershell.md).
102
102
103
103
Before you run the following sample script, replace placeholder values (including brackets) with your values.
The following Azure CLI command assigns an Azure role to an Entra identity based on sign-in name. For more information about assigning Azure roles by using the Azure CLI, see [Add or remove Azure role assignments by using the Azure CLI](../../role-based-access-control/role-assignments-cli.md).
116
+
The following Azure CLI command assigns an Azure role to a Microsoft Entra identity based on sign-in name. For more information about assigning Azure roles by using the Azure CLI, see [Add or remove Azure role assignments by using the Azure CLI](../../role-based-access-control/role-assignments-cli.md).
117
117
118
118
Before you run the following command, replace placeholder values (including brackets) with your own values.
119
119
@@ -127,10 +127,10 @@ az role assignment create --role "<role-name>" --assignee <user-principal-name>
127
127
128
128
## Share-level permissions for all authenticated identities
129
129
130
-
You can add a default share-level permission on your storage account, instead of configuring share-level permissions for Entra users or groups. A default share-level permission assigned to your storage account applies to all file shares contained in the storage account.
130
+
You can add a default share-level permission on your storage account, instead of configuring share-level permissions for Microsoft Entra users or groups. A default share-level permission assigned to your storage account applies to all file shares contained in the storage account.
131
131
132
132
> [!IMPORTANT]
133
-
> If you set a default share-level permission on the storage account, you don't need to sync your on-premises identities to Entra ID.
133
+
> If you set a default share-level permission on the storage account, you don't need to sync your on-premises identities to Microsoft Entra ID.
134
134
135
135
When you set a default share-level permission, all authenticated users and groups have the same permission. Authenticated users or groups are identified as the identity that can be authenticated against the AD DS deployment that the storage account is associated with.
You can assign permissions to all authenticated Entra users and to specific Entra users or groups. When you use this configuration, a specific user or group gets the higher-level permission between the default share-level permission and the RBAC assignment.
188
+
You can assign permissions to all authenticated Microsoft Entra users and to specific Microsoft Entra users or groups. When you use this configuration, a specific user or group gets the higher-level permission between the default share-level permission and the RBAC assignment.
189
189
190
190
For example, suppose you grant a user the Storage File Data SMB Reader role on the target file share. You also grant the default share-level permission Storage File Data SMB Share Elevated Contributor to all authenticated users. With this configuration, that particular user has Storage File Data SMB Share Elevated Contributor access to the file share. Higher-level permissions always take precedence.
191
191
192
192
## Understanding group-based access for non-synced users
193
193
194
194
This section applies only to storage accounts that use AD DS authentication.
195
195
196
-
Users who aren't synced to Entra ID can still access Azure file shares through group membership. If a user belongs to an on-premises AD DS group that's synced to Entra ID and has an Azure RBAC role assignment, the user gets the group's permissions, even though they don't appear as a group member in the Microsoft Entra admin center.
196
+
Users who aren't synced to Microsoft Entra ID can still access Azure file shares through group membership. If a user belongs to an on-premises AD DS group that's synced to Microsoft Entra ID and has an Azure RBAC role assignment, the user gets the group's permissions, even though they don't appear as a group member in the Microsoft Entra admin center.
197
197
198
198
Here's how it works:
199
199
200
-
- Only the group needs to be synced to Entra ID, not individual users.
200
+
- Only the group needs to be synced to Microsoft Entra ID, not individual users.
201
201
- When a user authenticates, the on-premises domain controller sends a Kerberos ticket that includes all the user's group memberships.
202
202
- Azure Files reads the group security identifiers (SIDs) from the Kerberos ticket.
203
-
- If any of those groups are synced to Entra ID, Azure Files applies the matching RBAC role assignments.
203
+
- If any of those groups are synced to Microsoft Entra ID, Azure Files applies the matching RBAC role assignments.
204
204
205
-
Because of this process, authorization is based on the groups listed in the Kerberos ticket, not on what appears in the Microsoft Entra admin center. Non-synced users can access file shares through their synced AD DS group memberships without needing individual syncing to Entra ID.
205
+
Because of this process, authorization is based on the groups listed in the Kerberos ticket, not on what appears in the Microsoft Entra admin center. Non-synced users can access file shares through their synced AD DS group memberships without needing individual syncing to Microsoft Entra ID.
0 commit comments