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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
vpandey07
New Member

PowerBI Rest API Authorization Error

We have followed the steps given for registering a service principal for external customer App. We need to get the embed token from Power BI Rest API using a Java backend. Java app first acquired the access token from Microsoft Graph and then called the below endpoint - 

However we are getting 401 error with response header 

X-PowerBI-Error-Info : ServicePrincipalsNotAllowedByTebsntAdminSwitch.

 

Could some one provide some feedback what is missing ? 

3 REPLIES 3
vpandey07
New Member

Yes , the SP does have permission.

vpandey07
New Member

n Portal or in our case Azure ?

sergej_og
Super User
Super User

Hey @vpandey07 ,
I'm not the expert on this field but maybe this guy can deliver you an idea for troubleshooting your issue.
https://pbi-guy.com/2023/05/21/create-a-post-request-with-power-bi/

Do you have given tenant permission to your SP to use XMLA endpoint? (in your tenant settings).

Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.