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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
nupur
Regular Visitor

PowerBI API

Hello,

 

I am trying to use powerBi API to use AD group with mailbox that will be used for admin access PowerBI environment. As of today, it is not possible to grant access to an AD group without a mail address. This makes administration complicated, as the individual people need to be removed every time someone on the team leaves/starts. I am using this powershell script to get the result but its not working, looking for some help.

 

 

$Body1 = @{
identifier=“xyz”
groupUserAccessRight=“Admin”
principalType=“Group”
}

$BodyJSON1=$Body1 | ConvertTo-Json
Invoke-PowerBIRestMethod -Method post -Url “groups/abc/users” -Body $BodyJSON1 -debug

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @nupur ,

If email is not turned on, joining is not supported.

Here are the three supported mailbox groups:

Security groups, distribution lists, Microsoft 365 groups.

https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-give-access-new-workspaces#give-...

 

If you want to delete people in a group, you can use Power BI Rest "Groups --Delete User In Group"

Deletes the specified user permissions from the specified workspace.

https://docs.microsoft.com/en-us/rest/api/power-bi/groups/delete-user-in-group

 

Best Regards,

Liu Yang

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @nupur ,

If email is not turned on, joining is not supported.

Here are the three supported mailbox groups:

Security groups, distribution lists, Microsoft 365 groups.

https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-give-access-new-workspaces#give-...

 

If you want to delete people in a group, you can use Power BI Rest "Groups --Delete User In Group"

Deletes the specified user permissions from the specified workspace.

https://docs.microsoft.com/en-us/rest/api/power-bi/groups/delete-user-in-group

 

Best Regards,

Liu Yang

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

ibarrau
Super User
Super User

Hi. Let me see if I understand. You want to add an AD Group to a workspace with role Admin with the API. The answer would be no you can't. As you can see in the API doc, adding users is one by one "Add Group User" request.
https://docs.microsoft.com/en-us/rest/api/power-bi/groups

However you can add a group in the workspace with the UI. Just go to Power Bi Service, open the workspace, "access" option and add it. Of course you need permission on the workspace (if you don't have it and you are admin, add you as admin with the API or ask the admin to add you as admin)

I hope that helps,


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

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors