SOLVED
Home

How to run this cmdlet?

Andy Kw
Occasional 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
Solution

I was able to resolve this issue.

 

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

 

Cheers.

Related Conversations
Extentions Synchronization
Deleted in Discussions on
3 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies