Skip to content

Commit b125f0d

Browse files
authored
Merge pull request #312543 from khdownie/kendownie030326-2
Files multiple forest auth integrity check
2 parents df37733 + aaa0958 commit b125f0d

1 file changed

Lines changed: 60 additions & 57 deletions

File tree

articles/storage/files/storage-files-identity-multiple-forests.md

Lines changed: 60 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Use Azure Files with Multiple Active Directory (AD) Forests
2+
title: Use Azure Files with Multiple Active Directory Forests
33
description: Configure on-premises Active Directory Domain Services (AD DS) authentication for SMB Azure file shares with an AD DS environment using multiple forests.
44
author: khdownie
55
ms.service: azure-file-storage
66
ms.topic: how-to
7-
ms.date: 02/23/2026
7+
ms.date: 03/03/2026
88
ms.author: kendownie
99
ms.custom: sfi-image-nochange
1010
# Customer intent: As an IT administrator managing multiple Active Directory forests, I want to configure Azure file shares with identity-based authentication, so that users from different forests can access shared resources seamlessly.
@@ -17,11 +17,11 @@ ms.custom: sfi-image-nochange
1717
Many organizations want to use identity-based authentication for SMB Azure file shares in environments that have multiple on-premises Active Directory Domain Services (AD DS) forests. This is a common IT scenario, especially following mergers and acquisitions, where the acquired company's AD forests are isolated from the parent company's AD forests. This article explains how forest trust relationships work and provides step-by-step instructions for multi-forest setup and validation.
1818

1919
> [!IMPORTANT]
20-
> To set share-level permissions for specific Microsoft Entra ID users or groups by using Azure role-based access control (RBAC), first sync the on-premises AD accounts to Entra ID by using [Microsoft Entra Connect](../../active-directory/hybrid/whatis-azure-ad-connect.md). Otherwise, use a [default share-level permission](storage-files-identity-assign-share-level-permissions.md#share-level-permissions-for-all-authenticated-identities).
20+
> To set share-level permissions for specific Microsoft Entra ID users or groups by using Azure role-based access control (RBAC), first sync the on-premises AD accounts to Entra ID by using [Microsoft Entra Connect Sync](/entra/identity/hybrid/connect/how-to-connect-sync-whatis). Otherwise, use a [default share-level permission](storage-files-identity-assign-share-level-permissions.md#share-level-permissions-for-all-authenticated-identities).
2121
2222
## Prerequisites
2323

24-
- Two AD DS domain controllers with different forests and on different virtual networks (VNETs)
24+
- Two AD DS domain controllers with different forests and on different virtual networks
2525
- Sufficient AD permissions to perform administrative tasks (for example, Domain Admin)
2626
- If using Azure RBAC, both forests must be reachable by a single Microsoft Entra Connect Sync server
2727

@@ -35,15 +35,15 @@ A forest trust is a transitive trust between two AD forests that allows users in
3535

3636
To configure a multi-forest setup, perform the following steps:
3737

38-
- Collect domain information and VNET connections between domains
38+
- Collect domain information and virtual network connections between domains
3939
- Establish and configure a forest trust
4040
- Set up identity-based authentication and hybrid user accounts
4141

4242
### Collect domain information
4343

4444
For this exercise, we have two on-premises AD DS domain controllers with two different forests and in different virtual networks.
4545

46-
| **Forest** | **Domain** | **VNET** |
46+
| **Forest** | **Domain** | **Virtual network** |
4747
|--------|--------|------|
4848
| Forest 1 | onpremad1.com | DomainServicesVNet WUS |
4949
| Forest 2 | onpremad2.com | vnet2/workloads |
@@ -61,16 +61,16 @@ To enable clients from **Forest 1** to access Azure Files domain resources in **
6161
1. Right-click on the local domain **onpremad2.com**, and then select the **Trusts** tab.
6262
1. Select **New Trusts** to launch the **New Trust Wizard**.
6363
1. Specify the domain name you want to build trust with (in this example, **onpremad1.com**), and then select **Next**.
64-
1. For **Trust Type**, select **Forest trust**, and then select **Next**.
64+
1. For **Trust Type**, select **Forest trust**, and then select **Next**.
6565
1. For **Direction of Trust**, select **Two-way**, and then select **Next**.
6666

67-
:::image type="content" source="media/storage-files-identity-multiple-forests/direction-of-trust.png" alt-text="Screenshot of Active Directory Domains and Trusts console showing how to select a two-way direction for the trust." border="true":::
67+
:::image type="content" source="media/storage-files-identity-multiple-forests/direction-of-trust.png" alt-text="Screenshot of Active Directory Domains and Trusts console showing how to select a two-way direction for the trust." border="true":::
6868

6969
1. For **Sides of Trust**, select **This domain only**, and then select **Next**.
7070
1. Users in the specified forest can be authenticated to use all of the resources in the local forest (forest-wide authentication) or only those resources that you select (selective authentication). For **Outgoing Trust Authentication Level**, select **Forest-wide authentication**, which is the preferred option when both forests belong to the same organization. Select **Next**.
7171
1. Enter a password for the trust, and then select **Next**. You must use the same password when creating this trust relationship in the specified domain.
7272

73-
:::image type="content" source="media/storage-files-identity-multiple-forests/trust-password.png" alt-text="Screenshot of Active Directory Domains and Trusts console showing how to enter a password for the trust." border="true":::
73+
:::image type="content" source="media/storage-files-identity-multiple-forests/trust-password.png" alt-text="Screenshot of Active Directory Domains and Trusts console showing how to enter a password for the trust." border="true":::
7474

7575
1. You should see a message that the trust relationship was successfully created. To configure the trust, select **Next**.
7676
1. Confirm the outgoing trust, and select **Next**.
@@ -97,7 +97,7 @@ After you establish the trust, follow these steps to create a storage account an
9797
- If the user is synced to Entra ID, grant a share-level permission (Azure RBAC role) to the user **onprem1user** on storage account **onprem1sa** so the user can mount the file share. To do this, go to the file share you created in **onprem1sa** and follow the instructions in [Assign share-level permissions for specific Microsoft Entra users or groups](storage-files-identity-assign-share-level-permissions.md#share-level-permissions-for-specific-azure-ad-users-or-groups).
9898
- Otherwise, use a [default share-level permission](storage-files-identity-assign-share-level-permissions.md#share-level-permissions-for-all-authenticated-identities) that applies to all authenticated identities.
9999

100-
Repeat steps 4-8 for **Forest2** domain **onpremad2.com** (storage account **onprem2sa**/user **onprem2user**). If you have more than two forests, repeat the steps for each forest.
100+
Repeat steps 4-8 for **Forest 2** domain **onpremad2.com** (storage account **onprem2sa**/user **onprem2user**). If you have more than two forests, repeat the steps for each forest.
101101

102102
## Configure directory and file-level permissions (optional)
103103

@@ -109,7 +109,7 @@ If icacls fails with an *Access is denied* error, follow these steps to configur
109109

110110
1. Re-mount the share by using either the [Windows permission model for SMB admin](storage-files-identity-configure-file-level-permissions.md#use-the-windows-permission-model-for-smb-admin) or the storage account key (not recommended). See [Mount SMB Azure file share on Windows](storage-how-to-use-files-windows.md).
111111

112-
1. Set icacls permissions for user in **Forest2** on storage account joined to **Forest1** from client in **Forest1**.
112+
1. Set icacls permissions for user in **Forest 2** on storage account joined to **Forest 1** from client in **Forest 1**.
113113

114114
> [!NOTE]
115115
> Don't use File Explorer to configure ACLs in a multi-forest environment. Although users who belong to the forest that's domain-joined to the storage account can have file and directory-level permissions set via File Explorer, it doesn't work for users that don't belong to the same forest that's domain-joined to the storage account.
@@ -124,12 +124,12 @@ For example, when users in a domain in **Forest 1** want to reach a file share w
124124

125125
You can configure domain suffixes by using one of the following methods:
126126

127-
- [Modify storage account suffix and add a CNAME record](#modify-storage-account-name-suffix-and-add-cname-record) (recommended - works with two or more forests)
127+
- [Modify storage account SPN suffix and add a CNAME record](#modify-storage-account-spn-suffix-and-add-cname-record) (recommended - works with two or more forests)
128128
- [Add custom name suffix and routing rule](#add-custom-name-suffix-and-routing-rule) (doesn't work with more than two forests)
129129

130-
### Modify storage account name suffix and add CNAME record
130+
### Modify storage account SPN suffix and add CNAME record
131131

132-
You can solve the domain routing issue by modifying the suffix of the storage account name associated with the Azure file share, and then adding a CNAME record to route the new suffix to the endpoint of the storage account. With this configuration, domain-joined clients can access storage accounts joined to any forest. This solution works for environments that have two or more forests.
132+
You can solve the domain routing issue by modifying the SPN suffix of the storage account associated with the Azure file share, and then adding a CNAME record to route the new suffix to the endpoint of the storage account. With this configuration, domain-joined clients can access storage accounts joined to any forest. This solution works for environments that have two or more forests.
133133

134134
In this example, the domains **onpremad1.com** and **onpremad2.com** have **onprem1sa** and **onprem2sa** as storage accounts associated with SMB Azure file shares in the respective domains. These domains are in different forests that trust each other to access resources in each other's forests. You want to allow access to both storage accounts from clients who belong to each forest. To do this, you need to modify the SPN suffixes of the storage account:
135135

@@ -180,7 +180,7 @@ First, add a new custom suffix on **Forest 2**. Make sure you have the appropria
180180
1. Open the **Active Directory Domains and Trusts** console.
181181
1. Right-click on **Active Directory Domains and Trusts**.
182182
1. Select **Properties**, and then select **Add**.
183-
1. Add "file.core.windows.net" as the UPN Suffix.
183+
1. Add "file.core.windows.net" as the UPN suffix.
184184
1. Select **Apply**, then **OK** to close the wizard.
185185

186186
Next, add the suffix routing rule on **Forest 1**, so that it redirects to **Forest 2**.
@@ -197,58 +197,62 @@ Next, add the suffix routing rule on **Forest 1**, so that it redirects to **For
197197
Validate that the trust is working by running the **klist** command to display the contents of the Kerberos credentials cache and key table.
198198

199199
1. Sign in to a machine or VM that's joined to a domain in **Forest 1** and open a Windows command prompt.
200+
200201
1. To display the credentials cache for the domain-joined storage account in **Forest 2**, run one of the following commands:
201-
- If you used the [Modify storage account name suffix and add CNAME record](#modify-storage-account-name-suffix-and-add-cname-record) method, run: `klist get cifs/onprem2sa.onpremad2.com`
202+
- If you used the [Modify storage account SPN suffix and add CNAME record](#modify-storage-account-spn-suffix-and-add-cname-record) method, run: `klist get cifs/onprem2sa.onpremad2.com`
202203
- If you used the [Add custom name suffix and routing rule](#add-custom-name-suffix-and-routing-rule) method, run: `klist get cifs/onprem2sa.file.core.windows.net`
204+
203205
1. You should see output similar to the following. The klist output differs slightly based on which method you used to configure domain suffixes.
204206

205-
```
206-
Client: onprem1user @ ONPREMAD1.COM
207-
Server: cifs/onprem2sa.file.core.windows.net @ ONPREMAD2.COM
208-
KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
209-
Ticket Flags 0x40a10000 -> forwardable renewable pre_authent name_canonicalize
210-
Start Time: 11/22/2022 18:45:02 (local)
211-
End Time: 11/23/2022 4:45:02 (local)
212-
Renew Time: 11/29/2022 18:45:02 (local)
213-
Session Key Type: AES-256-CTS-HMAC-SHA1-96
214-
Cache Flags: 0x200 -> DISABLE-TGT-DELEGATION
215-
Kdc Called: onprem2.onpremad2.com
216-
```
207+
```
208+
Client: onprem1user @ ONPREMAD1.COM
209+
Server: cifs/onprem2sa.file.core.windows.net @ ONPREMAD2.COM
210+
KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
211+
Ticket Flags 0x40a10000 -> forwardable renewable pre_authent name_canonicalize
212+
Start Time: 11/22/2022 18:45:02 (local)
213+
End Time: 11/23/2022 4:45:02 (local)
214+
Renew Time: 11/29/2022 18:45:02 (local)
215+
Session Key Type: AES-256-CTS-HMAC-SHA1-96
216+
Cache Flags: 0x200 -> DISABLE-TGT-DELEGATION
217+
Kdc Called: onprem2.onpremad2.com
218+
```
217219

218220
1. Sign in to a machine or VM that's joined to a domain in **Forest 2** and open a Windows command prompt.
221+
219222
1. To display the credentials cache for the domain-joined storage account in **Forest 1**, run one of the following commands:
220-
- If you used the [Modify storage account name suffix and add CNAME record](#modify-storage-account-name-suffix-and-add-cname-record) method, run: `klist get cifs/onprem1sa.onpremad1.com`
223+
- If you used the [Modify storage account SPN suffix and add CNAME record](#modify-storage-account-spn-suffix-and-add-cname-record) method, run: `klist get cifs/onprem1sa.onpremad1.com`
221224
- If you used the [Add custom name suffix and routing rule](#add-custom-name-suffix-and-routing-rule) method, run: `klist get cifs/onprem1sa.file.core.windows.net`
225+
222226
1. You should see output similar to the following. The klist output differs slightly based on which method you used to configure domain suffixes.
223227

224-
```
225-
Client: onprem2user @ ONPREMAD2.COM
226-
Server: krbtgt/ONPREMAD2.COM @ ONPREMAD2.COM
227-
KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
228-
Ticket Flags 0x40e10000 -> forwardable renewable pre_authent name_canonicalize
229-
Start Time: 11/22/2022 18:46:35 (local)
230-
End Time: 11/23/2022 4:46:35 (local)
231-
Renew Time: 11/29/2022 18:46:35 (local)
232-
Session Key Type: AES-256-CTS-HMAC-SHA1-96
233-
Cache Flags: 0x1 -> PRIMARY
234-
Kdc Called: onprem2
235-
236-
Client: onprem2user @ ONPREMAD2.COM
237-
Server: cifs/onprem1sa.file.core.windows.net @ ONPREMAD1.COM
238-
KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
239-
Ticket Flags 0x40a10000 -> forwardable renewable pre_authent name_canonicalize
240-
Start Time: 11/22/2022 18:46:35 (local)
241-
End Time: 11/23/2022 4:46:35 (local)
242-
Renew Time: 11/29/2022 18:46:35 (local)
243-
Session Key Type: AES-256-CTS-HMAC-SHA1-96
244-
Cache Flags: 0x200 -> DISABLE-TGT-DELEGATION
245-
Kdc Called: onpremad1.onpremad1.com
246-
```
228+
```
229+
Client: onprem2user @ ONPREMAD2.COM
230+
Server: krbtgt/ONPREMAD2.COM @ ONPREMAD2.COM
231+
KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
232+
Ticket Flags 0x40e10000 -> forwardable renewable pre_authent name_canonicalize
233+
Start Time: 11/22/2022 18:46:35 (local)
234+
End Time: 11/23/2022 4:46:35 (local)
235+
Renew Time: 11/29/2022 18:46:35 (local)
236+
Session Key Type: AES-256-CTS-HMAC-SHA1-96
237+
Cache Flags: 0x1 -> PRIMARY
238+
Kdc Called: onprem2
239+
240+
Client: onprem2user @ ONPREMAD2.COM
241+
Server: cifs/onprem1sa.file.core.windows.net @ ONPREMAD1.COM
242+
KerbTicket Encryption Type: AES-256-CTS-HMAC-SHA1-96
243+
Ticket Flags 0x40a10000 -> forwardable renewable pre_authent name_canonicalize
244+
Start Time: 11/22/2022 18:46:35 (local)
245+
End Time: 11/23/2022 4:46:35 (local)
246+
Renew Time: 11/29/2022 18:46:35 (local)
247+
Session Key Type: AES-256-CTS-HMAC-SHA1-96
248+
Cache Flags: 0x200 -> DISABLE-TGT-DELEGATION
249+
Kdc Called: onpremad1.onpremad1.com
250+
```
247251

248252
If you see the preceding output, you're done. If you don't, follow these steps to provide alternative UPN suffixes to make multi-forest authentication work.
249253

250254
> [!IMPORTANT]
251-
> This method works only in environments with two forests. If you have more than two forests, use one of the other methods to configure domain suffixes.
255+
> Adding a custom name suffix and routing rule works only in environments with two forests. If you have more than two forests, [modify the storage account SPN suffix and add a CNAME record](#modify-storage-account-spn-suffix-and-add-cname-record) instead.
252256
253257
First, add a new custom suffix on **Forest 1**.
254258

@@ -268,9 +272,8 @@ Next, add the suffix routing rule on **Forest 2**.
268272
1. Check if the "onprem1sa.file.core.windows.net" suffix shows up. If not, select **Refresh**.
269273
1. Select "onprem1sa.file.core.windows.net", then select **Enable** and **Apply**.
270274

271-
## Next steps
275+
## Next step
272276

273-
For more information, see the following resources:
277+
For more information, see:
274278

275-
- [Overview of Azure Files identity-based authentication support (SMB only)](storage-files-active-directory-overview.md)
276-
- [Azure Files FAQ](storage-files-faq.md)
279+
- [Overview of Azure Files identity-based authentication (SMB only)](storage-files-active-directory-overview.md)

0 commit comments

Comments
 (0)