Azure-Samples / Azure-Samples/azure-files-samples
Error finding computer in ActiveDirectory
Open
- Dominant language
- PowerShell
- Stars
- 261
- Forks
- 202
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 4
Description
We named the OU storing the domain groups for ACL in AD the same as the storageaccount. Therefore multiple objects where returned while querying for the computer account resulting in Join-AzStorageAccountForAuth to fail.
Please change code using OrganizationalUnitDistinguishedName (and not just the name) to find the computer account. Additionally the objectclass "computer" or "user" could be added while querying...
File - AzFilesHybrid.psm1
Line - 2706
$obj = Get-ADObject -Server $Domain -Filter "Name -eq '$ADObjectName'" -ErrorAction Stop
I can provide experienced return in PM.
Contributor guide
Assessment
This issue has not been assessed yet.