Skip to content

Commit 2db5497

Browse files
authored
Merge pull request #313678 from ShawnJackson/azure-files-authorization-and-access-control
[AQ] edit pass: Azure Files articles about authorization and access control
2 parents 85a654f + 593c585 commit 2db5497

6 files changed

Lines changed: 376 additions & 315 deletions
Lines changed: 47 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Authorize Access to Azure File Share Data in the Azure portal
3-
description: When you access file data using the Azure portal, the portal makes requests to Azure Files behind the scenes. These requests can be authenticated and authorized using either your Microsoft Entra account or the storage account access key.
2+
title: Authorize Access to Azure File Share Data in the Azure Portal
3+
description: Learn how requests to Azure Files for accessing file data are authenticated and authorized through a Microsoft Entra account or a storage account access key.
44
author: khdownie
55
ms.service: azure-file-storage
66
ms.topic: how-to
@@ -9,19 +9,20 @@ ms.author: kendownie
99
# Customer intent: "As a cloud administrator, I want to configure authorization access for Azure file share data so that I can securely manage user permissions and control data access through the Azure portal."
1010
---
1111

12-
# Choose how to authorize access to file data in the Azure portal
12+
# Authorize access to file data in the Azure portal
1313

1414
**Applies to:** :heavy_check_mark: SMB file shares
1515

16-
When you access file data by using the [Azure portal](https://portal.azure.com?azure-portal=true), the portal makes requests to the Azure Files service behind the scenes. You can authorize these requests by using either your Microsoft Entra account (preferred) or the storage account access key (less secure). The portal shows which method you're using and enables you to switch between the two methods if you have the appropriate permissions. By default, the portal uses whichever method you're already using to authorize all file shares, but you can change this setting for individual file share operations.
16+
When you access file data by using the [Azure portal](https://portal.azure.com?azure-portal=true), the portal makes requests to the Azure Files service behind the scenes. You can authorize these requests by using either your Microsoft Entra account (preferred) or the storage account access key (less secure).
1717

18-
> [!IMPORTANT]
19-
> This article explains how to authorize access to file data in the Azure portal. It doesn't cover how to set up identity-based authentication to file shares for end users. To learn about identity-based authentication, see [Overview of Azure Files identity-based authentication](storage-files-active-directory-overview.md).
18+
The portal shows which method you're using and enables you to switch between the two methods if you have the appropriate permissions. By default, the portal uses whichever method you're already using to authorize all file shares. You can change this setting for individual file share operations.
19+
20+
This article explains how to authorize access to file data in the Azure portal. It doesn't cover how to set up identity-based authentication to file shares for users. To learn about identity-based authentication, see [Overview of Azure Files identity-based authentication](storage-files-active-directory-overview.md).
2021

2122
> [!WARNING]
2223
> Accessing a file share by using storage account keys has inherent security risks. Always authenticate by using Microsoft Entra when possible. For information on how to protect and manage your keys, see [Manage storage account access keys](../common/storage-account-keys-manage.md).
2324
24-
## Permissions needed to access file data
25+
## Get permissions to access file data
2526

2627
Depending on how you want to authorize access to file data in the Azure portal, you need specific permissions. In most cases, you get these permissions through [Azure role-based access control (Azure RBAC)](../../role-based-access-control/overview.md).
2728

@@ -32,90 +33,104 @@ Depending on how you want to authorize access to file data in the Azure portal,
3233
To access file data from the Azure portal by using your Entra account, both of the following statements must be true:
3334

3435
- You're assigned either a built-in or custom role that provides access to file data.
35-
- You're assigned the Azure Resource Manager [Reader](../../role-based-access-control/built-in-roles.md#reader) role, at a minimum, scoped to the level of the storage account or higher. The **Reader** role grants the most restricted permissions, but another Azure Resource Manager role that grants access to storage account management resources is also acceptable.
36+
- You're assigned the Azure Resource Manager [Reader](../../role-based-access-control/built-in-roles.md#reader) role, at a minimum, scoped to the level of the storage account or higher. The Reader role grants the most restricted permissions, but another Azure Resource Manager role that grants access to storage account management resources is also acceptable.
3637

37-
The Azure Resource Manager **Reader** role permits users to view storage account resources, but not modify them. It doesn't provide read permissions to data in Azure Storage, but only to account management resources. The **Reader** role is necessary so that users can navigate to file shares in the Azure portal.
38+
The Azure Resource Manager Reader role permits users to view storage account resources, but not modify them. It doesn't provide read permissions to data in Azure Storage, but only to account management resources. The Reader role is necessary so that users can go to file shares in the Azure portal.
3839

3940
Two built-in roles have the required permissions to access file data by using OAuth:
41+
4042
- [Storage File Data Privileged Reader](../../role-based-access-control/built-in-roles.md#storage-file-data-privileged-reader)
4143
- [Storage File Data Privileged Contributor](../../role-based-access-control/built-in-roles.md#storage-file-data-privileged-contributor)
4244

4345
For information about the built-in roles that support access to file data, see [Access Azure file shares using Microsoft Entra ID with Azure Files OAuth over REST](authorize-oauth-rest.md).
4446

4547
> [!NOTE]
46-
> The **Storage File Data Privileged Contributor** role has permissions to read, write, delete, and modify ACLs/NTFS permissions on files and directories in Azure file shares. Modifying ACLs/NTFS permissions isn't supported via the Azure portal.
48+
> The Storage File Data Privileged Contributor role has permissions to read, write, delete, and modify ACLs/NTFS permissions on files and directories in Azure file shares. Modifying ACLs/NTFS permissions isn't supported via the Azure portal.
4749
48-
Custom roles can support different combinations of the same permissions provided by the built-in roles. For more information, see [Azure custom roles](../../role-based-access-control/custom-roles.md) and [Understand role definitions for Azure resources](../../role-based-access-control/role-definitions.md).
50+
Custom roles can support different combinations of the same permissions that the built-in roles provide. For more information, see [Azure custom roles](../../role-based-access-control/custom-roles.md) and [Understand role definitions for Azure resources](../../role-based-access-control/role-definitions.md).
4951

5052
### Use the storage account access key (not recommended)
5153

52-
To access file data by using the storage account access key, you must have an Azure role assigned to you that includes the Azure RBAC action **Microsoft.Storage/storageAccounts/listkeys/action**. This Azure role can be a built-in role or a custom role. Built-in roles that support **Microsoft.Storage/storageAccounts/listkeys/action** include the following, listed in order from least to greatest permissions:
54+
To access file data by using the storage account access key, you must have an Azure role assigned to you that includes the Azure RBAC action `Microsoft.Storage/storageAccounts/listkeys/action`. This Azure role can be built in or custom.
55+
56+
The following built-in roles support `Microsoft.Storage/storageAccounts/listkeys/action`. They're listed in order from least to greatest permissions.
5357

54-
- The [Reader and Data Access role](../../role-based-access-control/built-in-roles.md#reader-and-data-access)
55-
- The [Storage Account Contributor role](../../role-based-access-control/built-in-roles.md#storage-account-contributor)
56-
- The Azure Resource Manager [Contributor role](../../role-based-access-control/built-in-roles.md#contributor)
57-
- The Azure Resource Manager [Owner role](../../role-based-access-control/built-in-roles.md#owner)
58+
- [Reader and Data Access role](../../role-based-access-control/built-in-roles.md#reader-and-data-access)
59+
- [Storage Account Contributor role](../../role-based-access-control/built-in-roles.md#storage-account-contributor)
60+
- Azure Resource Manager [Contributor role](../../role-based-access-control/built-in-roles.md#contributor)
61+
- Azure Resource Manager [Owner role](../../role-based-access-control/built-in-roles.md#owner)
5862

59-
When you attempt to access file data in the Azure portal, the portal first checks whether you have a role with **Microsoft.Storage/storageAccounts/listkeys/action**. If you have a role with this action, the portal uses the storage account key for accessing file data. If you don't have a role with this action, the portal attempts to access data by using your Entra account.
63+
When you attempt to access file data in the Azure portal, the portal first checks whether you have a role with `Microsoft.Storage/storageAccounts/listkeys/action`. If you have a role with this action, the portal uses the storage account key for accessing file data. If you don't have a role with this action, the portal attempts to access data by using your Entra account.
6064

6165
> [!IMPORTANT]
62-
> When you lock a storage account by using a Resource Manager **ReadOnly** lock, you can't perform the [List Keys](/rest/api/storagerp/storageaccounts/listkeys) operation for that storage account. **List Keys** is a POST operation, and all POST operations are prevented when a **ReadOnly** lock is configured for the account. For this reason, when you lock the account by using a **ReadOnly** lock, you must use Entra credentials to access file data in the portal. For information about accessing file data in the Azure portal by using Microsoft Entra ID, see [Use your Microsoft Entra account](#use-your-azure-ad-account).
66+
> When you lock a storage account by using a Resource Manager `ReadOnly` lock, you can't perform the [listKeys](/rest/api/storagerp/storageaccounts/listkeys) operation for that storage account. The `listKeys` operation is a `POST` operation, and all `POST` operations are prevented when a `ReadOnly` lock is configured for the account.
67+
>
68+
> For this reason, when you lock the account by using a `ReadOnly` lock, you must use Entra credentials to access file data in the portal. For information about accessing file data in the Azure portal by using Microsoft Entra ID, see [Use your Microsoft Entra account](#use-your-azure-ad-account).
6369
64-
> [!NOTE]
65-
> The classic subscription administrator roles **Service Administrator** and **Co-Administrator** include the equivalent of the Azure Resource Manager [Owner](../../role-based-access-control/built-in-roles.md#owner) role. The **Owner** role includes all actions, including the **Microsoft.Storage/storageAccounts/listkeys/action** action, so a user with one of these administrative roles can also access file data by using the storage account key. For more information, see [Azure roles, Microsoft Entra roles, and classic subscription administrator roles](../../role-based-access-control/rbac-and-directory-admin-roles.md#classic-subscription-administrator-roles).
70+
The classic subscription administrator roles Service Administrator and Co-Administrator include the equivalent of the Azure Resource Manager [Owner](../../role-based-access-control/built-in-roles.md#owner) role. The Owner role includes all actions, including the `Microsoft.Storage/storageAccounts/listkeys/action` action. A user with one of these administrative roles can also access file data by using the storage account key. For more information, see [Azure roles, Microsoft Entra roles, and classic subscription administrator roles](../../role-based-access-control/rbac-and-directory-admin-roles.md#classic-subscription-administrator-roles).
6671

6772
## Specify how to authorize operations on a specific file share
6873

69-
You can change the authentication method for individual file shares. By default, the portal uses the current authentication method. To determine the current authentication method, follow these steps.
74+
You can change the authentication method for individual file shares. By default, the portal uses the current authentication method. To determine the current authentication method, follow these steps:
75+
76+
1. In the Azure portal, go to your storage account.
77+
78+
1. On the service menu, under **Data storage**, select **File shares**.
7079

71-
1. Go to your storage account in the Azure portal.
72-
1. In the service menu, under **Data storage**, select **File shares**.
7380
1. Select a file share.
81+
7482
1. Select **Browse**.
75-
1. The **Authentication method** shows whether you're currently using the storage account access key or your Entra account to authenticate and authorize file share operations. If you're currently authenticating by using the storage account access key, you see **Access Key** specified as the authentication method, as in the following image. If you're authenticating by using your Entra account, you see **Microsoft Entra user account** specified instead.
7683

77-
:::image type="content" source="media/authorize-data-operations-portal/auth-method-access-key.png" alt-text="Screenshot showing the authentication method set to access key.":::
84+
1. **Authentication method** shows whether you're currently using the storage account access key or your Entra account to authenticate and authorize file share operations.
85+
86+
If you're currently authenticating by using the storage account access key, **Access key** is specified as the authentication method, as shown in the following image. If you're authenticating by using your Entra account, **Microsoft Entra user account** is specified instead.
87+
88+
:::image type="content" source="media/authorize-data-operations-portal/auth-method-access-key.png" alt-text="Screenshot that shows the authentication method set to access key.":::
7889

7990
<a name='authenticate-with-your-azure-ad-account'></a>
8091

8192
### Authenticate by using your Microsoft Entra account (recommended)
8293

83-
To switch to using your Entra account, select the link highlighted in the image that says **Switch to Microsoft Entra user account**. If you have the appropriate permissions through the Azure roles that are assigned to you, you can proceed. However, if you lack the necessary permissions, you see an error message that you don't have permissions to list the data by using your user account with Entra ID.
94+
To switch to using your Entra account, select the link highlighted in the image that says **Switch to Microsoft Entra user account**. If you have the appropriate permissions through the Azure roles that are assigned to you, you can proceed. If you lack the necessary permissions, an error message says you don't have permissions to list the data by using your user account with Entra ID.
8495

8596
Two additional RBAC permissions are required to use your Entra account:
97+
8698
- `Microsoft.Storage/storageAccounts/fileServices/readFileBackupSemantics/action`
8799
- `Microsoft.Storage/storageAccounts/fileServices/writeFileBackupSemantics/action`
88100

89101
No file shares appear in the list if your Entra account lacks permissions to view them.
90102

91103
### Authenticate by using the storage account access key (not recommended)
92104

93-
To switch to using the account access key, select the link that says **Switch to access key.** If you have access to the storage account key, you can proceed. However, if you don't have access to the account key, you see an error message that you don't have permissions to use the access key to list data.
105+
To switch to using the account access key, select the link that says **Switch to access key**. If you have access to the storage account key, you can proceed. If you don't have access to the account key, an error message says you don't have permissions to use the access key to list data.
94106

95107
No file shares appear in the list if you don't have access to the storage account access key.
96108

97109
<a name='default-to-azure-ad-authorization-in-the-azure-portal'></a>
98110

99111
## Default to Microsoft Entra authorization in the Azure portal
100112

101-
When you create a new storage account, you can specify that the Azure portal defaults to authorization with Entra ID when a user navigates to file data. You can also configure this setting for an existing storage account. This setting specifies the default authorization method only. A user can override this setting and choose to authorize data access by using the storage account key.
113+
When you create a new storage account, you can specify that the Azure portal defaults to authorization with Entra ID when a user accesses file data. You can also configure this setting for an existing storage account. This setting specifies the default authorization method only. A user can override this setting and choose to authorize data access by using the storage account key.
102114

103115
To specify that the portal uses Entra authorization by default for data access when you create a storage account, follow these steps:
104116

105-
1. Create a new storage account, following the instructions in [Create a storage account](../common/storage-account-create.md).
106-
1. On the **Advanced** tab, in the **Security** section, check the box next to **Default to Microsoft Entra authorization in the Azure portal**.
117+
1. Create a new storage account by following the instructions in [Create an Azure storage account](../common/storage-account-create.md).
107118

108-
:::image type="content" source="media/authorize-data-operations-portal/default-auth-account-create-portal.png" alt-text="Screenshot showing how to configure default Microsoft Entra authorization in Azure portal for new account.":::
119+
1. On the **Advanced** tab, in the **Security** section, select the **Default to Microsoft Entra authorization in the Azure portal** checkbox.
120+
121+
:::image type="content" source="media/authorize-data-operations-portal/default-auth-account-create-portal.png" alt-text="Screenshot that shows how to configure default Microsoft Entra authorization in Azure portal for a new account.":::
109122

110123
1. Select **Review + create** to run validation and create the storage account.
111124

112125
To update this setting for an existing storage account, follow these steps:
113126

114127
1. Go to the storage account overview in the Azure portal.
128+
115129
1. Under **Settings**, select **Configuration**.
130+
116131
1. Set **Default to Microsoft Entra authorization in the Azure portal** to **Enabled**.
117132

118-
## See also
133+
## Related content
119134

120135
- [Access Azure file shares using Microsoft Entra ID with Azure Files OAuth over REST](authorize-oauth-rest.md)
121136
- [Authorize access to data in Azure Storage](../common/authorize-data-access.md)

0 commit comments

Comments
 (0)