Enable AD authentication for Azure Files

Tim H 21 Reputation points
2021-03-31T14:12:08.143+00:00

I am trying to enable AD authentication for Azure Files. Using the Microsoft provided documentation I get to the following PowerShell command.

join-AzStorageAccountForAuth -ResourceGroupName "<resource-group-name>" -Name "<storage-account-name>" -Domain "localdomain.net" -DomainAccountType ServiceLogonAccount -OrganizationalUnitDistinguishedName "ou-name-attribute-value"

I modify -OrganizationalUnitDistinguishedName "ou-name-attribute-value" to -OrganizationalUnitDistinguishedName "Aure Files", this orginizational unit exists in my domain.

However I get the following error:
Cannot find an object with identity: 'Azure Files' under 'DC=ad,DC=timhoo,DC=com'.

I am currently stuck because somehow the command is not finding my orginazational unit.83361-capture.png83362-capture1.png

See Screenshots below:

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,162 questions
0 comments No comments
{count} votes

Accepted answer
  1. deherman-MSFT 33,296 Reputation points Microsoft Employee
    2021-04-01T18:53:58.21+00:00

    @Tim H
    It looks like you are specifying the OU Name rather than the OU DistinguishedName. You can try substituting -OrganizationalUnitDistinguishedName with -OrganizationalUnitName. Otherwise use Get-ADOrganizationalUnit to find the DistinguishedName and set it appropriately. It should look something like the name below.

    -OrganizationalUnitDistinguishedName "OU=Azure Files,DC=CONTOSO,DC=COM"  
    

    Hope this helps! Let us know if you are still facing issues or have further questions.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


0 additional answers

Sort by: Most helpful