question

TimH-7453 avatar image
0 Votes"
TimH-7453 asked TimH-7453 commented

Enable AD authentication for Azure Files

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
capture.png (65.0 KiB)
capture1.png (32.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

deherman-MSFT avatar image
0 Votes"
deherman-MSFT answered TimH-7453 commented

@TimH-7453
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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you, This worked

0 Votes 0 ·