Showing results for 
Search instead for 
Did you mean: 

JS Client API calls to load Embedded Report in App Own Data setup returns 401



We have setup in our organization an application associated with a Service Principal (following those guides: and


The backend of the application retrieves an embed token for a report (using which is then used by the frontend with the powerbi javascript library ( to show the report in the user's browser.


The problem is that in some specific cases, the API calls made by powerbi-client returns 401 errors, while for other users, with the exact same embed token and report, everything works without problem.


We noticed that it happened to the user that had previously logged to powerbi service ( using a Free PowerBI Account. If they clear the cookies from their browser for the domain, then everything works as expected.


I believe that the API serving the report using embed token should be ignoring any cookie and other identification and only exploit the embed token to validate the request.

Status: Needs Info
Super Contributor

Hi @victornoel ,


Did this problem occur to all web browsers or some specific browsers that users used to log in Power BI Service? It looks like a problem that some browsers might cache your login info which causes conflict with specified token in API.


To avoid this behavior, I would suggest those users log in service with a different web browser or open browser in private mode.


Best regards,

Yuliana Gu

Super Contributor
Status changed to: Needs Info

Hi @v-yulgu-msft, thank you for the proposition but we are already aware of this workaround as you can see in the original description.


This is a bug and PowerBI service should gracefuly handle those situtations.