Forum Discussion

OneWithQuestion's avatar
OneWithQuestion
Post Prodigy
6 years ago

PowerShell Add-PowerBIWorkspaceUser : Operation returned an invalid status code 'Unauthorized'

I am using the PowerShell PBI admin commands and I am unable to get this to work, has anyone else had any luck with this?

Add-PowerBIWorkspaceUser : Operation returned an invalid status code 'Unauthorized'

I use the command and include 
Add-PowerBIWorkspaceUser -Id xxxxxxx -UserPrincipalName '[email protected]' -AccessRight Admin

When I run resolve error this is what I get back that seems pertinent
Response : Unauthorized (401):
PowerBIErrorInfo : GroupNotAccessible


3 Replies

  • v-lionel-msft's avatar
    v-lionel-msft
    Community Support

    Hi OneWithQuestion ,

     

    Are you the admin of this workspace?

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Getting the same error, even though I'm the Admin for the company.

    Contributor and Viewer, no problem.

    • Anonymous's avatar
      Anonymous
      Not applicable

      how do you resolve the problem, thanks