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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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).

MattCalderwood
Responsive Resident
Responsive Resident

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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