Skip to content

Commit 1e78ca2

Browse files
authored
Update storage-files-identity-auth-active-directory-enable.md
1 parent 7ba2b39 commit 1e78ca2

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

articles/storage/files/storage-files-identity-auth-active-directory-enable.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,17 @@ Azure Files AD authentication (preview) is available in [all regions in Public C
6767

6868
Before you enable AD Authentication over SMB for Azure file shares, we recommend that you walk through the [prerequisites](#prerequisites) and make sure you've completed all the steps. The prerequisites validate that your AD, Azure AD, and Azure Storage environments are properly configured.
6969

70-
Next, grant access to Azure Files resources with AD credentials:
70+
Next, follow the steps below to setup Azure Files for AD Authentication:
7171

72-
- Enable Azure Files AD authentication on your storage account.
72+
1. Enable Azure Files AD authentication on your storage account.
7373

74-
- Assign access permissions for a share to the Azure AD identity (a user, group, or service principal) that is in sync with the target AD identity.
74+
2. Assign access permissions for a share to the Azure AD identity (a user, group, or service principal) that is in sync with the target AD identity.
7575

76-
- Configure ACLs over SMB for directories and files.
76+
3. Configure ACLs over SMB for directories and files.
7777

78-
- Mount an Azure file share from an AD domain joined VM.
78+
4. Mount an Azure file share from an AD domain joined VM.
79+
80+
5. Rotate AD account password (Optional)
7981

8082
The following diagram illustrates the end-to-end workflow for enabling Azure AD authentication over SMB for Azure file shares.
8183

@@ -84,25 +86,28 @@ The following diagram illustrates the end-to-end workflow for enabling Azure AD
8486
> [!NOTE]
8587
> AD authentication over SMB for Azure file shares is only supported on machines or VMs running on OS versions newer than Windows 7 or Windows Server 2008 R2.
8688
87-
## Enable AD authentication for your account
89+
## 1. Enable AD authentication for your account
8890

8991
To enable AD authentication over SMB for Azure file shares, you need to first register your storage account with AD and then set the required domain properties on the storage account. When the feature is enabled on the storage account, it applies to all new and existing file shares in the account. Use `join-AzStorageAccountForAuth` to enable the feature. You can find the detailed description of the end-to-end workflow in the section below.
9092

9193
> [!IMPORTANT]
9294
> The `Join-AzStorageAccountForAuth` cmdlet will make modifications to your AD environment. Read the following explanation to better understand what it is doing to ensure you have the proper permissions to execute the command and that the applied changes align with the compliance and security policies.
9395
94-
The `Join-AzStorageAccountForAuth` cmdlet will perform the equivalent of an offline domain join on behalf of the indicated storage account. It will create an account in your AD domain, either a [computer account](https://docs.microsoft.com/windows/security/identity-protection/access-control/active-directory-accounts#manage-default-local-accounts-in-active-directory) or a [service logon account](https://docs.microsoft.com/windows/win32/ad/about-service-logon-accounts). The created AD account represents the storage account in the AD domain. If the AD account is created under an AD Organizational Unit (OU) that enforces password expiration, you must update the password before the maximum password age. Failing to update AD account password will result in authentication failures when accessing Azure file shares. To learn how to update the password, see [Update AD account password](#update-ad-account-password).
96+
The `Join-AzStorageAccountForAuth` cmdlet will perform the equivalent of an offline domain join on behalf of the indicated storage account. It will create an account in your AD domain, either a [computer account](https://docs.microsoft.com/windows/security/identity-protection/access-control/active-directory-accounts#manage-default-local-accounts-in-active-directory) (default) or a [service logon account](https://docs.microsoft.com/windows/win32/ad/about-service-logon-accounts). The created AD account represents the storage account in the AD domain. If the AD account is created under an AD Organizational Unit (OU) that enforces password expiration, you must update the password before the maximum password age. Failing to update AD account password will result in authentication failures when accessing Azure file shares. To learn how to update the password, see [Update AD account password](#update-ad-account-password).
9597

9698
You can use the following script to perform the registration and enable the feature or, alternatively, you can manually perform the operations that the script would. Those operations are described in the section following the script. You do not need to do both.
9799

98-
### 1. Check prerequisites
100+
### 1.1 Check prerequisites
99101
- [Download and unzip the AzFilesHybrid module](https://github.com/Azure-Samples/azure-files-samples/releases)
100102
- Install and execute the module in a device that is domain joined to AD with AD credentials that have permissions to create a service logon account or a computer account in the target AD.
101103
- Run the script using an AD credential that is synced to your Azure AD. The AD credential must have either the storage account owner or the contributor RBAC role permissions.
102104
- Make sure your storage account is in a [supported region](#regional-availability).
103105

104-
### 2. Domain join your storage account
106+
### 1.2 Domain join your storage account
105107
Remember to replace the placeholder values with your own in the parameters below before executing it in PowerShell.
108+
> [!IMPORTANT]
109+
> We recommend you to provide an AD Organizational Unit (OU) that does NOT enforce password expiration. If you use an OU with password expiration configured, you must update the password before the maximum password age. Failing to update AD account password will result in authentication failures when accessing Azure file shares. To learn how to update the password, see [Update AD account password](#update-ad-account-password).
110+
106111

107112
```PowerShell
108113
#Change the execution policy to unblock importing AzFilesHybrid.psm1 module
@@ -121,19 +126,19 @@ Connect-AzAccount
121126
Select-AzSubscription -SubscriptionId "<your-subscription-id-here>"
122127
123128
# Register the target storage account with your active directory environment under the target OU (for example: specify the OU with Name as "UserAccounts" or DistinguishedName as "OU=UserAccounts,DC=CONTOSO,DC=COM").
124-
# You can use to this PowerShell cmdlet: Get-ADOrganizationalUnit to find the Name and DistinguishedName of your target OU. If you are using the OU Name, specify it with -OrganizationalUnitName as shown below. If you are using the OU DistinguishedName, you can set it with -OrganizationalUnitDistinguishedName.
129+
# You can use to this PowerShell cmdlet: Get-ADOrganizationalUnit to find the Name and DistinguishedName of your target OU. If you are using the OU Name, specify it with -OrganizationalUnitName as shown below. If you are using the OU DistinguishedName, you can set it with -OrganizationalUnitDistinguishedName. You can choose to provide one of the two names to specify the target OU.
125130
# You can choose to create the identity that represents the storage account as either a Service Logon Account or Computer Account, depends on the AD permission you have and preference.
126131
Join-AzStorageAccountForAuth `
127132
-ResourceGroupName "<resource-group-name-here>" `
128133
-Name "<storage-account-name-here>" `
129134
-DomainAccountType "ComputerAccount" `
130-
-OrganizationalUnitName "<ou-name-here>"
135+
-OrganizationalUnitName "<ou-name-here>" or -OrganizationalUnitDistinguishedName "<ou-distinguishedname-here>"
131136
```
132137

133138
The following description summarizes all actions performed when the `Join-AzStorageAccountForAuth` cmdlet gets executed. You may perform these steps manually, if you prefer not to use the command:
134139

135140
> [!NOTE]
136-
> If you have already executed the `Join-AzStorageAccountForAuth` script above successfully, go to the next section "3. Confirm that the feature is enabled". You do not need to perform the operations below again.
141+
> If you have already executed the `Join-AzStorageAccountForAuth` script above successfully, go to the next section "1.3 Confirm that the feature is enabled". You do not need to perform the operations below again.
137142
138143
#### a. Checking environment
139144

@@ -170,7 +175,7 @@ Set-AzStorageAccount `
170175
```
171176

172177

173-
### 3. Confirm that the feature is enabled
178+
### 1.3 Confirm that the feature is enabled
174179

175180
You can check to confirm whether the feature is enabled on your storage account, you can use the following script:
176181

@@ -193,7 +198,7 @@ You've now successfully enabled the feature on your storage account. Even though
193198

194199
You have now successfully enabled AD authentication over SMB and assigned a custom role that provides access to an Azure file share with an AD identity. To grant additional users access to your file share, follow the instructions in the [Assign access permissions](#assign-access-permissions-to-an-identity) to use an identity and [Configure NTFS permissions over SMB](#configure-ntfs-permissions-over-smb) sections.
195200

196-
## Update AD account password
201+
## 5. Update AD account password
197202

198203
If you registered the AD identity/account representing your storage account under an OU that enforces password expiration time, you must rotate the password before the maximum password age. Failing to update the password of the AD account will result in authentication failures to access Azure file shares.
199204

0 commit comments

Comments
 (0)