Forum Discussion
Give users access to workspaces in Power BI using code
Hi All,
I found this topic: https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-give-access-new-workspaces
I wanna to confirm that any ideas to achieve it using code? like powerShell or C# .... Thanks.
- Anonymous3 years ago
Hi simonlxd ,
As far as I know, you can try to call Power BI Rest API to add users to workspace and give them permissions by PowerShell.
Rest API : Groups - Add Group User - REST API (Power BI Power BI REST APIs) | Microsoft Learn
For reference:
Power BI Cmdlets reference | Microsoft Learn
Call any Power BI REST API with PowerShell - Bing video
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi simonlxd ,
As far as I know, you can try to call Power BI Rest API to add users to workspace and give them permissions by PowerShell.
Rest API : Groups - Add Group User - REST API (Power BI Power BI REST APIs) | Microsoft Learn
For reference:
Power BI Cmdlets reference | Microsoft Learn
Call any Power BI REST API with PowerShell - Bing video
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.