cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
New Member

Re: Push DataSet API with Service Principle Authentication

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
Highlighted
New Member

Re: Push DataSet API with Service Principle Authentication

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

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Power BI Desktop August 2020 Update

Power BI Desktop August 2020 Update

We have great updates this month! Click the link for the video with more info.