Azure File Shares using cloud-only Microsoft Entra ID (Azure AD) identities over SMB is not supported without integrating with either:
- Active Directory Domain Services (AD DS) — via Azure AD Connect or Cloud Sync to sync on-premises AD identities with Entra ID.
- Microsoft Entra Domain Services (Entra DS) — a managed domain service that allows Entra ID authentication over SMB.
Supported Scenarios for SMB Access:
- On-Prem AD DS → Entra ID (Hybrid): Sync AD identities to Entra ID and access Azure File Shares over SMB.
- Entra Domain Services (Entra DS): Use Entra DS-joined VMs to access Azure File Shares.
- Entra Kerberos for Hybrid Identities: Allows hybrid identities to use Kerberos for SMB access—cloud-only identities are not supported.
- Linux Clients via AD Kerberos: Linux clients can authenticate over SMB using AD DS or Entra DS.
As a workaround for cloud-only Entra ID users, consider using the Azure Files REST API with OAuth tokens or SAS tokens.
You can assign the appropriate built-in role to your user to grant access the Azure file share.
Command:
$User = "xxxxx"
$PWord = ConvertTo-SecureString -String "password" -AsPlainText -Force
$tenant = "xxx"
$subscription = "xxxx"
$Credential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $User,$PWord
Connect-AzAccount -Credential $Credential -Tenant $tenant -Subscription $subscription
$ctxkey = (Get-AzStorageAccount -ResourceGroupName "venkatesan-rg" -Name "venkat9012").Context
Note:
The above command connects your Entra ID with the Azure file share. However, while these alternatives allow access to Azure file shares, they do not support SMB protocol access for cloud-only Entra ID identities.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.
If you have any other questions or are still running into more issues, let me know in the “comments” and I would be happy to help you.