Forum Discussion
Permission Change on Power BI workspaces
- 1 year ago
I already provided the details. Remove the admins, add the contributors.
- 1 year ago
Hi NBK52
To update Power BI workspace permissions using PowerShell, first, import the Power BI module and authenticate using Login-PowerBI. Then, load the CSV file containing workspace IDs and names. For each workspace, retrieve the list of users with "Admin" access using Get-PowerBIWorkspace. Loop through these users, remove their "Admin" role using Remove-PowerBIWorkspaceUser, and assign them "Contributor" access using Add-PowerBIWorkspaceUser. Ensure you have Power BI admin permissions to execute these changes. The script can be modified to exclude certain users or log changes for tracking. Additionally, automation can be achieved using a service principal instead of interactive login. Always review permissions before running the script to prevent accidental access modifications.
Yes, That woud leave without Admins..Workspace Admins already there for each Workflow but we need to change who are having admin permission to workspaces to contribute.
We have list of workspaces and workspaces ids in CSV file, Now we want to change whoever having the admin permission to those users to contribute through PowerShell script.
We need to do it in bulk hence required PowerShell script that read data from CSV file and change the permission
Can this be done?. Let us know if any details required