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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Operation returned an invalid status code 'Unauthorized'

I am trying to embed power BI report but i get the following error

 

PBIuser2010_0-1658831742903.png

  • I have changed the web config file
  • I have given access for service principal to access power BI
  • I have given access to all PowerBI service API
  • I have added my app name in Workspace access.

 

Still I get this error. Please help me on this.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello, 

Thanks for the reply, I did.

However when I create the app through Azure Active directory->App registrations it doesn't throw an error. When I create it directly from azure portal it doesn't work. Maybe it's organisation's security rules.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hello, 

Thanks for the reply, I did.

However when I create the app through Azure Active directory->App registrations it doesn't throw an error. When I create it directly from azure portal it doesn't work. Maybe it's organisation's security rules.

v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

Did you add "Content.Create" API permission to the application registered in AAD. A similar problem is addressed in this post, please refer to Solved: Operation returned an invalid status code 'Unautho... - Microsoft Power BI Community

 

Or you can follow the official article to do it.

Embed content in your Power BI embedded analytics application - Power BI | Microsoft Docs

 

Best Regards

Community Support Team _ chenwu zhu

 

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 Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.