question

AdminMRE-2308 avatar image
0 Votes"
AdminMRE-2308 asked JimmyYang-MSFT commented

Error occurred while executing Add-TeamUser

Good morning

I am trying to add users as owner to a Teams group via Graph and when I link the first line I get the error:



Add-TeamUser : Error occurred while executing Add-TeamUser
Code: Authorization_RequestDenied
Message: Insufficient privileges to complete the operation.
InnerError:
RequestId: 244f0e23-4160-4db4-a4fc-bd340e2460c6
DateTimeStamp: 2021-10-21T08:48:39
HttpStatusCode: Authorization_RequestDenied
At line:1 char:1
+ Add-TeamUser -GroupId "a2fac853-9115-4095-ae1a-52a0065babfb" -User Ve ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-TeamUser], ApiException
+ FullyQualifiedErrorId : Microsoft.TeamsCmdlets.PowerShell.Custom.ErrorHandling.ApiException,Microsoft.TeamsCmdlets.PowerShell.Custom.AddTeamUser




This command has worked in the past, I don't know what happened, can you help me?

Thank you very much

office-teams-windows-itpro
· 3
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.

The command that I'm ussing is: Add-TeamUser -GroupId "a2facxxx-9xx5-4095-axxa-52axxxxbabfb" -User
xxxxx@contoso.org -Role Owner

0 Votes 0 ·

Hi @AdminMRE-2308

Do you have the same problem when running other Teams command?

According to your provided error message, it seems you have no privileges to run this command. Could you try to quit PowerShell and login admin account again to see if it can be fixed?

0 Votes 0 ·

@AdminMRE-2308

It has been a while, how is everything going?
If you have any update about this issue, please feel free to post back.

0 Votes 0 ·

0 Answers