Azure-Samples / Azure-Samples/azure-files-samples

Join-AzStorageAccountForAuth lack of permissions?

Open
#54 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
261
Forks
202
Avg merge
1d 5h
Merged PRs (30d)
4

Description

When I try to run command:

**Join-AzStorageAccountForAuth -ResourceGroupName $ResourceGroupName -StorageAccountName $StorageAccountName -DomainAccountType ComputerAccount**
Getting this error:
```
New-ADAccountForStorageAccount : Unable to create AD object. Please check that you have permission to create an identity of type ComputerAccount in Active Directory location path 'XXX' for the storage account 'XXX'
At C:\Documents\WindowsPowerShell\Modules\AzFilesHybrid\0.2.2.0\AzFilesHybrid.psm1:4266 char:37
+ ... eOverride = New-ADAccountForStorageAccount @newParams -ErrorAction St ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-ADAccountForStorageAccount
```
It doesn't matter if I run this as regular user or domain admin, from domain joined computer or domain controller, with or without elevated powershell / ISE.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.