Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-PBIGroupUser error when using -groupUserAccessRight Member #40

Open
aaronu7 opened this issue Jun 27, 2018 · 3 comments
Open

New-PBIGroupUser error when using -groupUserAccessRight Member #40

aaronu7 opened this issue Jun 27, 2018 · 3 comments

Comments

@aaronu7
Copy link

aaronu7 commented Jun 27, 2018

Command:
New-PBIGroupUser -authToken $token -groupId $groupId -emailAddress $email -groupUserAccessRight Member

Error:
Invoke-PBIRequest : The remote server returned an error: (400) Bad Request. -
'{"error":{"code":"UnsupportedAccessRightError","pbi.error":{"code":"UnsupportedAccessRightError","parameters":{},"details":[]}}}'
At C:\Program Files\WindowsPowerShell\Modules\PowerBIPS\2.0.1.3\PowerBIPS.psm1:501 char:12

  • ... $result = Invoke-PBIRequest -authToken $authToken -method Post -res ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WebException
    • FullyQualifiedErrorId : System.Net.WebException,Invoke-PBIRequest
@tonswart
Copy link

Mind the "Note:" on https://docs.microsoft.com/en-us/rest/api/power-bi/groups/addgroupuser

API Version: v1.0
Grants the specified user permissions to the specified workspace.
Note: Only Admin access right is supported.

@fmms
Copy link
Contributor

fmms commented Jul 8, 2019

Why does this restriction exist? Is there any work around?

@tonswart
Copy link

tonswart commented Jul 9, 2019

Not tested yet, but they told me that using workspace V2 should work:

https://docs.microsoft.com/en-us/rest/api/power-bi/groups/creategroup
POST https://api.powerbi.com/v1.0/myorg/groups?workspaceV2={workspaceV2}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants