Skip to content

Commit 4dec0dd

Browse files
committed
Add PowerShell and CLI
1 parent 5562e36 commit 4dec0dd

1 file changed

Lines changed: 34 additions & 4 deletions

File tree

articles/storage/files/change-identity-source.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to switch between identity sources for Azure Files identi
44
author: khdownie
55
ms.service: azure-file-storage
66
ms.topic: how-to
7-
ms.date: 03/05/2026
7+
ms.date: 03/06/2026
88
ms.author: kendownie
99
# Customer intent: As a storage administrator, I want to change the identity source configured on my storage account, so that I can switch to a different authentication method for Azure file shares.
1010
---
@@ -22,7 +22,9 @@ For guidance on choosing the right identity source for your environment, see [Ov
2222
2323
## Step 1: Verify the current identity source
2424

25-
Use the Azure portal to verify the identity source that's currently enabled on your storage account. Supported identity sources for SMB Azure file shares are Active Directory Domain Services (AD DS), Microsoft Entra Domain Services, and Microsoft Entra Kerberos.
25+
First, verify the identity source that's currently enabled on your storage account. Supported identity sources for SMB Azure file shares are Active Directory Domain Services (AD DS), Microsoft Entra Domain Services, and Microsoft Entra Kerberos.
26+
27+
# [Portal](#tab/portal)
2628

2729
1. Sign in to the [Azure portal](https://portal.azure.com) and select the storage account.
2830

@@ -38,9 +40,37 @@ Use the Azure portal to verify the identity source that's currently enabled on y
3840

3941
:::image type="content" source="media/change-identity-source/identity-source-status.png" alt-text="Screenshot showing which identity source is enabled on the storage account." lightbox="media/change-identity-source/identity-source-status.png":::
4042

43+
# [Azure PowerShell](#tab/powershell)
44+
45+
Check the identity source that's enabled on your storage account by running the following cmdlet. Replace `<resource-group-name>` and `<storage-account-name>` with your values.
46+
47+
If the cmdlet returns **None**, then no identity source is enabled on the storage account and you can proceed to [Enable a new identity source](#step-3-enable-a-new-identity-source).
48+
49+
```azurepowershell
50+
# Get the target storage account
51+
$storageaccount = Get-AzStorageAccount `
52+
-ResourceGroupName "<resource-group-name>" `
53+
-Name "<storage-account-name>"
54+
55+
# List the identity source for the selected storage account
56+
$storageAccount.AzureFilesIdentityBasedAuth.DirectoryServiceOptions
57+
```
58+
59+
# [Azure CLI](#tab/cli)
60+
61+
Check the identity source that's enabled on your storage account by running the following command. Replace `<resource-group-name>` and `<storage-account-name>` with your values.
62+
63+
If the command returns **None**, then no identity source is enabled on the storage account and you can proceed to [Enable a new identity source](#step-3-enable-a-new-identity-source).
64+
65+
```azurecli
66+
az storage account show --name <storage-account-name> --resource-group <resource-group-name> --query "azureFilesIdentityBasedAuthentication.directoryServiceOptions" --output tsv
67+
```
68+
69+
---
70+
4171
## Step 2: Disable the current identity source
4272

43-
Use the tabs below to find steps for disabling your current identity source.
73+
Disable your current identity source by using the Azure portal, Azure PowerShell, or Azure CLI.
4474

4575
### Active Directory Domain Services (AD DS)
4676

@@ -76,7 +106,7 @@ az storage account update --name <storage-account-name> --resource-group <resour
76106
# [Portal](#tab/portal)
77107

78108
1. Under **Microsoft Entra Domain Services**, select **Configure**.
79-
1. Uncheck the **Microsoft Entra Domain Services** checkbox.
109+
1. Uncheck the **Enable Microsoft Entra Domain Services** checkbox.
80110
1. Select **Save**.
81111

82112
# [Azure PowerShell](#tab/powershell)

0 commit comments

Comments
 (0)