Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
KUMAR_AK
Microsoft Employee
Microsoft Employee

Adding SG to all reports in PBI Workspace

Hi All 
I have a PBI  workspace with list of reports (around 300 ) in workspace, and i want to add Security group (SG) to all the reports in workspace. i dont want to do it manually (meaning i dont want to go to manage permissions and add user).

1. Is there any automated way to do that ? or any power shell script ?or Rest API to follow ?

Note : While add the user manually using manage permission , i will get the below pop up to add , once i add the user i dont want o send the email  notification to the user (Meaning i want to uncheck the Send email notification) is that possibile while automating the process through powershell or Rest API ?

KUMAR_AK_0-1640806577112.png

Can you please help me if there is any powershell script or any automated process to do this ?

Thanks
AK

4 REPLIES 4
saiudthawar22
New Member

HI @KUMAR_AK Did you get the script working. As I have the same scenario where I need to add users to report in powerbI. could you please share me the script if you have it. TIA

KUMAR_AK
Microsoft Employee
Microsoft Employee

Hi @v-henryk-mstf 

I dont want to add to workspace , want to add to reports , Okay Here is the ex:
I have a workspace say PBITest - in premium per user and im the admin for the workspace. in that i worksapce i have 200 reports . i have to add SG to all 200 reports in my workspace. 

If i want to add SG im doing manually ie : - opening the report manage permission 
Step 1 : Below Secreenshot .

KUMAR_AK_0-1641177197289.png

Step 2 : - Going to Direct access and Add User (Below Screenshot)

KUMAR_AK_1-1641177315942.png

Step 3 - Once i add SG i want to uncheck send an email notification (Below ScreenShot)

KUMAR_AK_2-1641177417421.png

I want to Add this way for all the 200 reports 
Just checking is there any automated way to do it ?

Thanks
AK

v-henryk-mstf
Community Support
Community Support

Hi @KUMAR_AK ,

 

According to your description, you can add groups to workspace via Powershell and set the appropriate role permissions. But it is not possible to share report etc.

vhenrykmstf_0-1641176154040.png

POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/users

vhenrykmstf_1-1641176451197.png

related blog and similiar solution.

ADDING AZURE AD SECURITY GROUP TO POWER BI WORKSPACE USING POWERSHELL - Ruki's Blog (rukiatu.com)

Solved: Share Power BI Report with PowerShell command - Microsoft Power BI Community

Add users to a Power BI workspace using PowerShell (sqlshack.com)


If the problem is still not resolved, please point it out. Looking forward to your feedback.


Best Regards,
Henry


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

TomMartens
Super User
Super User

Hey @KUMAR_AK ,

 

I'm wondering why you can't use an app, the intended way of sharing content (reports and dashboards) with users.

I'm not aware of an API that helps to share a report with a group.

Maybe you can consider to create an idea on ideas.powerbi.com

 

Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.