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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

New Power Bi API Endpoints for Managing Dataset Users

Hello,

 

I have a working application where I am able to create a workspace, add user/group to workspace, upload a pbix file to workspace etc. But for adding/giving user permission specific to a workspace, I was manually doing the Datasets - Manage Permissions section.

Now, I came to notice that we have new endpoints available for this purpose.

Datasets - Get Dataset Users - REST API (Power BI Power BI REST APIs) | Microsoft Docs

Datasets - Post Dataset User - REST API (Power BI Power BI REST APIs) | Microsoft Docs

 

I tried with an existing workspace and also I created a new workspace by passing workspacev2 flag as true. In both cases, I am not able to consume these endpoints. I am getting a 403 - "API is not accessible for application" error.

I have reverified the App permissions from the Azure portal and the permission scopes suggested in the above links are already there. I am having the SPN as Dataset(owner) also.

 

Can you please help me if there is something else I should do ?

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

According to your second screenshot, I think your application should be a Service Principal. As  far as I know, we don't need to granrt API Permissions in Azure portal like normal applications. I think we need to create a security group and add Service Principal as a member in group.

Then trun on both permissions in Power BI Tenant Setting.

  • Embed content in apps
  • Allow service principals to use Power BI APIs. (We need to add security group into this permission.)

And we need to add Service Principal as a member/admin in that workspace.

For reference:

Embed Power BI content with service principal and an application secret

 

Best Regards,
Rico Zhou

 

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

Attaching the screenshots:

API Permissions:

sreejithsreekum_0-1656967046022.png


Dataset Access for SPN:

sreejithsreekum_1-1656967095867.png

 

Hi @Anonymous ,

 

According to your second screenshot, I think your application should be a Service Principal. As  far as I know, we don't need to granrt API Permissions in Azure portal like normal applications. I think we need to create a security group and add Service Principal as a member in group.

Then trun on both permissions in Power BI Tenant Setting.

  • Embed content in apps
  • Allow service principals to use Power BI APIs. (We need to add security group into this permission.)

And we need to add Service Principal as a member/admin in that workspace.

For reference:

Embed Power BI content with service principal and an application secret

 

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.