SOLVED

How to run this cmdlet?

Brass Contributor

I'm trying to run the command below 

 

PS C:\Users\KW> New-AzureADDirectorySetting -DirectorySetting $Setting

but it gives me the following error

 

New-AzureADDirectorySetting : Error occurred while executing NewDirectorySetting
Code: Authorization_RequestDenied
Message: Insufficient privileges to complete the operation.
InnerError:
RequestId: 586c36ca-e48c-4367-a47c-dec15a6d7793
DateTimeStamp: Thu, 01 Mar 2018 15:03:42 GMT
HttpStatusCode: Forbidden
HttpStatusDescription: Forbidden
HttpResponseStatus: Completed
Au caractère Ligne:1 : 1
+ New-AzureADDirectorySetting -DirectorySetting $Setting
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureADDirectorySetting], ApiException
+ FullyQualifiedErrorId : Microsoft.Open.MSGraphBeta.Client.ApiException,Microsoft.Open.MSGraphBeta.PowerShell.New
DirectorySetting

Yet, I'm running powershell as an administrator.

 

Any ideas on what I'm doing wrong?

 

Cheers.

 

PS: I'm following this guide , to be able to limit users to create teams in Teams.

PS2: Please don't flag my post as a spam. I'm in dire need for help.

1 Reply
best response confirmed by Andy Kw (Brass Contributor)
Solution

I was able to resolve this issue.

 

I need to be 'Global administrator' to run the command above.

 

Cheers.

1 best response

Accepted Solutions
best response confirmed by Andy Kw (Brass Contributor)
Solution

I was able to resolve this issue.

 

I need to be 'Global administrator' to run the command above.

 

Cheers.

View solution in original post