|
| 1 | +--- |
| 2 | +title: Change the Identity Source for Azure Files |
| 3 | +description: Learn how to switch between identity sources for Azure Files identity-based authentication for SMB file shares by disabling your current identity source and enabling a new one. |
| 4 | +author: khdownie |
| 5 | +ms.service: azure-file-storage |
| 6 | +ms.topic: how-to |
| 7 | +ms.date: 03/06/2026 |
| 8 | +ms.author: kendownie |
| 9 | +# 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. |
| 10 | +--- |
| 11 | + |
| 12 | +# Change the identity source for Azure file shares |
| 13 | + |
| 14 | +**Applies to:** :heavy_check_mark: SMB Azure file shares |
| 15 | + |
| 16 | +Azure Files supports only one identity source per storage account for identity-based authentication over SMB. If you want to switch from one identity source to another, you must first disable the current identity source and then enable the new one. |
| 17 | + |
| 18 | +For guidance on choosing the right identity source for your environment, see [Overview of Azure Files identity-based authentication for SMB access](storage-files-active-directory-overview.md). |
| 19 | + |
| 20 | +> [!IMPORTANT] |
| 21 | +> Disabling the current identity source removes identity-based access for all file shares in the storage account immediately. Users can't access shares using identity-based authentication until you enable and configure a new identity source. |
| 22 | +
|
| 23 | +## Step 1: Verify the current identity source |
| 24 | + |
| 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) |
| 28 | + |
| 29 | +1. Sign in to the [Azure portal](https://portal.azure.com) and select the storage account. |
| 30 | + |
| 31 | +1. From the service menu, under **Data storage**, select **File shares**. |
| 32 | + |
| 33 | +1. Next to **Identity-based access**, check the configuration status. If it shows **Configured**, proceed to the next step. If it shows **Not configured**, 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). |
| 34 | + |
| 35 | + :::image type="content" source="media/change-identity-source/configure-identity-based-access.png" alt-text="Screenshot of the file shares pane in your storage account, identity-based access configuration status is highlighted." lightbox="media/change-identity-source/configure-identity-based-access.png"::: |
| 36 | + |
| 37 | +1. Select **Configured**. |
| 38 | + |
| 39 | +1. The portal shows the identity source that's enabled on the storage account and its configuration status. Other identity sources are grayed out. In this example, Microsoft Entra Kerberos is enabled as the identity source for the storage account. |
| 40 | + |
| 41 | + :::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"::: |
| 42 | + |
| 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 | + |
| 71 | +## Step 2: Disable the current identity source |
| 72 | + |
| 73 | +Disable your current identity source by using the Azure portal, Azure PowerShell, or Azure CLI. |
| 74 | + |
| 75 | +### Active Directory Domain Services (AD DS) |
| 76 | + |
| 77 | +# [Portal](#tab/portal) |
| 78 | + |
| 79 | +To disable AD DS on the storage account, follow these steps. |
| 80 | + |
| 81 | +1. Under **Active Directory Domain Services (AD DS)**, select **Configure**. |
| 82 | +1. Select the **Disable Active Directory for this storage account** checkbox. |
| 83 | +1. Select **Save**. |
| 84 | + |
| 85 | +> [!IMPORTANT] |
| 86 | +> After disabling AD DS authentication, consider deleting the AD DS computer account or service logon account that you created to represent the storage account in your on-premises AD. If you leave the identity in AD DS, it remains as an orphaned object. |
| 87 | +
|
| 88 | +# [Azure PowerShell](#tab/powershell) |
| 89 | + |
| 90 | +To disable AD DS on the storage account, run the following cmdlet. Replace the placeholder values with your own. |
| 91 | + |
| 92 | +```azurepowershell |
| 93 | +Set-AzStorageAccount -ResourceGroupName <resourceGroupName> -StorageAccountName <storageAccountName> -EnableActiveDirectoryDomainServicesForFile $false |
| 94 | +``` |
| 95 | + |
| 96 | +# [Azure CLI](#tab/cli) |
| 97 | + |
| 98 | +To disable AD DS on the storage account, run the following command. Replace the placeholder values with your own. |
| 99 | + |
| 100 | +```azurecli |
| 101 | +az storage account update --name <storage-account-name> --resource-group <resource-group-name> --enable-files-adds false |
| 102 | +``` |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +### Microsoft Entra Domain Services |
| 107 | + |
| 108 | +# [Portal](#tab/portal) |
| 109 | + |
| 110 | +To disable Microsoft Entra Domain Services on the storage account, follow these steps. |
| 111 | + |
| 112 | +1. Under **Microsoft Entra Domain Services**, select **Configure**. |
| 113 | +1. Uncheck the **Enable Microsoft Entra Domain Services** checkbox. |
| 114 | +1. Select **Save**. |
| 115 | + |
| 116 | +# [Azure PowerShell](#tab/powershell) |
| 117 | + |
| 118 | +To disable Microsoft Entra Domain Services on the storage account, run the following cmdlet. Replace the placeholder values with your own. |
| 119 | + |
| 120 | +```azurepowershell |
| 121 | +Set-AzStorageAccount -ResourceGroupName <resourceGroupName> -StorageAccountName <storageAccountName> -EnableAzureActiveDirectoryDomainServicesForFile $false |
| 122 | +``` |
| 123 | + |
| 124 | +# [Azure CLI](#tab/cli) |
| 125 | + |
| 126 | +To disable Microsoft Entra Domain Services on the storage account, run the following command. Replace the placeholder values with your own. |
| 127 | + |
| 128 | +```azurecli |
| 129 | +az storage account update --name <storage-account-name> --resource-group <resource-group-name> --enable-files-aadds false |
| 130 | +``` |
| 131 | + |
| 132 | +--- |
| 133 | + |
| 134 | +### Microsoft Entra Kerberos |
| 135 | + |
| 136 | +# [Portal](#tab/portal) |
| 137 | + |
| 138 | +To disable Microsoft Entra Kerberos on the storage account, follow these steps. |
| 139 | + |
| 140 | +1. Under **Microsoft Entra Kerberos**, select **Configure**. |
| 141 | +1. Uncheck the **Microsoft Entra Kerberos** checkbox. |
| 142 | +1. Select **Save**. |
| 143 | + |
| 144 | +# [Azure PowerShell](#tab/powershell) |
| 145 | + |
| 146 | +To disable Microsoft Entra Kerberos on the storage account, run the following cmdlet. Replace the placeholder values with your own. |
| 147 | + |
| 148 | +```azurepowershell |
| 149 | +Set-AzStorageAccount -ResourceGroupName <resourceGroupName> -StorageAccountName <storageAccountName> -EnableAzureActiveDirectoryKerberosForFile $false |
| 150 | +``` |
| 151 | + |
| 152 | +# [Azure CLI](#tab/cli) |
| 153 | + |
| 154 | +To disable Microsoft Entra Kerberos on the storage account, run the following command. Replace the placeholder values with your own. |
| 155 | + |
| 156 | +```azurecli |
| 157 | +az storage account update --name <storage-account-name> --resource-group <resource-group-name> --enable-files-aadkerb false |
| 158 | +``` |
| 159 | + |
| 160 | +--- |
| 161 | + |
| 162 | +## Step 3: Enable a new identity source |
| 163 | + |
| 164 | +After disabling the current identity source, follow the instructions for the new identity source you want to enable: |
| 165 | + |
| 166 | +- **Active Directory Domain Services (AD DS)**: See [Enable AD DS authentication](storage-files-identity-ad-ds-enable.md). |
| 167 | +- **Microsoft Entra Domain Services**: See [Enable Microsoft Entra Domain Services authentication](storage-files-identity-auth-domain-services-enable.md). |
| 168 | +- **Microsoft Entra Kerberos**: See [Enable Microsoft Entra Kerberos authentication for hybrid and cloud-only identities](storage-files-identity-auth-hybrid-identities-enable.md). |
0 commit comments