An Azure service that offers file shares in the cloud.
For this Azure File Sync registration error, the supported remediation is to bypass the Server Registration UI and register the server manually with PowerShell.
- Open an elevated PowerShell session on the server.
- Sign in to the correct subscription and tenant:
Connect-AzAccount -Subscription "<your-subscription-guid>" -Tenant "<your-tenant-guid>"
- Register the server manually:
Register-AzStorageSyncServer -ResourceGroupName "<your-resource-group-name>" -StorageSyncServiceName "<your-storage-sync-service-name>"
- After registration completes, verify that the server appears under Registered servers in the Azure portal.
This specific Unauthorized error during server registration is a known issue with the Azure File Sync v20 agent.
If registration still fails, collect the local registration error details and run the built-in diagnostics:
- Check the
AfsSrvRegistration*.logfile under%LocalAppData%\Tempand search forErrorMessage. - Run diagnostics:
Import-Module "C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.ServerCmdlets.dll"
Debug-StorageSyncServer -Diagnose
- Test network connectivity:
Import-Module "C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.ServerCmdlets.dll"
Debug-StorageSyncServer -TestNetworkConnectivity
If the agent was installed through the Azure Arc extension, check the extension failure details before reinstalling:
- In the Azure portal, open the Arc Server.
- Go to Extensions.
- Find
AzureFileSyncAgentExtension. - Select View Details under Status.
- Review the Error Message field.
If the extension deployment failed, uninstall and then reinstall the failed extension only after completing the required remediation. Uninstalling removes the saved error details.
Also confirm that .NET Framework 4.7.2 or later is installed. Azure File Sync server registration requires .NET Framework 4.7.2 or later. After installing it, restart the server and retry registration.
References: