Forum Discussion
Real time error 401 in embeded scenario
Hi TransDig ,
According to the error message, it seems that the problem was caused by insufficient privileges. Which authentication method you are using when embedded the report? Service principal or Master user? If you are using service principal, please check if grant the proper access for below steps:
Step 6 - Service principal API access
Step 7 - Enable workspace access
In addition, the following links are the ones which have the similar problem as yours. Hope their solution can help you solve the problem.
401 Unauthorized: Error while retrieving Embed URL (embed power bi for customers-Python)
Power Bi REST API - 401 Authorization error when using Service Principals
Power BI REST API - 401 Authorization error when using app secret/service principal
Best Regards
Hi Anonymous Thanks a lot for the response.
I tried to use one of the samples code provided in Embed content in your Power BI embedded analytics application - Power BI | Microsoft Learn page.
I sucesfully added the Service Principal autentication using a .net scenario but after sucessfully loaded one of our real time dashboards in the demo app the problem is the same. The dashboards (tiles, tables... etc) load perfectly but i cant see the refresh of the dashboard after the initial load.
I dont know where is the problem. Maybe in the power bi service or the app registered on Azure AD. The dashboards in power bi service is working well with the real time data from a push dataset but for any reason I cant see this refresh in a embeded scenario.
¿Any ideas?
Thanks a lot for the help.
- DMiradakis3 years agoAdvocate II
I have the EXACT same problem right now, same error message 401 in an embedded SaaS app that I've built for Power BI customers. Any ideas from anyone? It's like it's an internal problem within Microsoft/Azure or the Javascript SDK files.