troubleshooting Question

Powershell Error with join-AzStorageAccountForAuth

Avatar of Matthieu Thomas
Matthieu Thomas asked on
Powershell* Distributed File System Replication (DFSR)Azure
2 Comments1 Solution346 ViewsLast Modified:
Hello ,

I am tryning to Enable Active Directory authentication over SMB for Azure file shares and I am following the MS workflow Here

Unfortunately have a Powershell Error with  join-AzStorageAccountForAuth :

PS C:\windows\system32> Import-Module -name AzFilesHybrid

PS C:\windows\system32> Connect-AzAccount


PS C:\windows\system32> join-AzStorageAccountForAuth -ResourceGroupName "xxx" -Name "xxx" -DomainAccountType "ComputerAccount" -OrganizationUnitName "xxx"
Get-AzStorageAccountADObject : AD object  is of unsupported object class msDFSR-ReplicationGroup msDFSR-ContentSet computer.
At C:\Users\XXX\Documents\WindowsPowerShell\Modules\AzFilesHybrid\\AzFilesHybrid.psm1:2709 char:29
+     $azureStorageIdentity = Get-AzStorageAccountADObject `
+                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-AzStorageAccountADObject

PS C:\windows\system32> $storageaccount = Get-AzStorageAccount -ResourceGroupName "xxx" -Name "xxx"

PS C:\windows\system32> $storageAccount.AzureFilesIdentityBasedAuth.DirectoryServiceOptions

PS C:\windows\system32> $storageAccount.AzureFilesIdentityBasedAuth.ActiveDirectoryProperties

PS C:\windows\system32> 

Open in new window

Any thoughts ? Mat
Matthieu ThomasIT

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros