Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

PowerShell - Adding Power BI user in workspace

Hi All,   I am trying to add user in workspace from PowerShell script which works but if a user is already a member of it, it will fail. What I am trying to achieve is whatever latest information I...
  • ibarrau's avatar
    3 years ago

    Hi. Well the method says Add. So I guess it only adds. I'm not familiarized with power bi cmdlets, but I haven't seen a way to solve this using only that. However I know the API, it would let you build a script to fix it. You can try catch the exception and try an update of the user like the doc 

    https://learn.microsoft.com/en-us/rest/api/power-bi/groups/update-group-user

    That request let you update a user permission at a workspace.

    I hope that helps,