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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
fosters4him
New Member

Power BI Embed Errors

It was noticed shortly after 7/1 that our production Power BI Embed webpage started returnning "Unauthorized access"I thought it was maybe the app registration secret had expired, nope, it is set to never.  I used the production code and configured for http://localhost:13526/ and yesterday that was working fine, kept working with it and now I get . "The remote server returned an error: (401) Unauthorized." Tried created a new app registration using https://dev.powerbi.com/apps and set it up server side, usedd http://localhost:13526/ for the target and redirect urls.  After request for credentials, I get the authorization to use the api, and then after that I know get "The remote server returned an error: (401) Unauthorized."  I did notice the Embed samples are updated to .Net 4.8, I am not sure if that is what is causing my issue as I used the embed samples from about 3 years ago.  Any insight into this is much appreciated. Rick 

1 ACCEPTED SOLUTION
fosters4him
New Member

Hi, The issue was resolved by upgrading the PBI code line to .Net 4.8 and adding SSL to the website (now required for redirect).

View solution in original post

2 REPLIES 2
fosters4him
New Member

Hi, The issue was resolved by upgrading the PBI code line to .Net 4.8 and adding SSL to the website (now required for redirect).

Anonymous
Not applicable

Hi @fosters4him 

A couple of things come to mind...
Have you configured your app registration (in Azure) to have all required permissions for the actions you are trying to perform with the Power BI REST API?

In Azure you should be able to see something like the following.

MattCalderwood_0-1595003295845.png

If you are trying to fetch a list of dashboards for instance... then you will need 'Dashboard.Read.All'  enabled.

If these are set correctly... and the generated secret hasn't expired, then it may be access to one of your workspaces in Power BI.
It is worth double checking that the workspace you are connecting through to - has got the registered account listed within the workspace access list.

MattCalderwood_1-1595003544337.png

I cannot remember if you still need to add the service account as an admin still - but that is what I have mine set to.


Let me know if any of this helps.
Cheers, Matt

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.