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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
weeverjames
New Member

Push DataSet API with Service Principle Authentication

The customers of my company's SaaS application want us to push their data from our service to Power BI.

 

I would like to do that from our server directly but I'm running into issues. We've registered an application that requests the Tenant.ReadWrite.All role on the Power BI service and have the authentication flow set the permission to the Application type. That works fine but any call I make with an access token to the Power BI Push DataSet APIs results in a 403:

 

{
  "Message": "API is not accessible for application"
}

 

I've created a security group in my testing tenant, added the service principle as a member, and set the developer tenant settings to allow members of the security group access to workspaces in Power BI.

 

However I've also read that the Push DataSet APIs only work with "My Workspace" and under service principle authentication it appears that service principles are not allowed to work with "My Workspace."

 

So it seems like this is a dead end. Is there a way for a server-side application to push data to a tenant in Power BI without requiring every user to manually trigger and authorize each request?

1 ACCEPTED SOLUTION
weeverjames
New Member

I think I am right about service principles being restricted from using operations on endpoints that operate on "My Workspace."

 

One point of confusion that may trip someone up is that "groups" in the API are "Workspaces" in Power BI.

 

I get a 500 error if I try to create a group through the service principle. If I understand the restrictions on service principles if creating a group is an "admin" action then this might be a 403 error in disguise, does that sound right?

 

I've found that it's possible to create datasets, tables, and rows in "groups" using this authentication method.

View solution in original post

1 REPLY 1
weeverjames
New Member

I think I am right about service principles being restricted from using operations on endpoints that operate on "My Workspace."

 

One point of confusion that may trip someone up is that "groups" in the API are "Workspaces" in Power BI.

 

I get a 500 error if I try to create a group through the service principle. If I understand the restrictions on service principles if creating a group is an "admin" action then this might be a 403 error in disguise, does that sound right?

 

I've found that it's possible to create datasets, tables, and rows in "groups" using this authentication method.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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