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
marcobaciga
Helper I
Helper I

Error receive access token with browser different IE

Hi,

i have a problem when i use a browser different to Internet Explorer for receiving access_token.

In firefox i have this error:

 

Error: No access token was found for element. You must specify an access token directly on the element using attribute 'powerbi-access-token' or specify a global token at: powerbi.accessToken.

 

this is code:

 

 var access_token="";

 var settings = {
   async: true,
   crossDomain: true,
   url: "https://login.windows.net/common/oauth2/token",
   method: "POST",
   data: "request "
   dataType: "json"
 }

 

 $.ajax(settings).always(function (response) {
  access_token=response.access_token; 

 

 

2 REPLIES 2
Eric_Zhang
Employee
Employee

@marcobaciga

 

Were you playing with any Power BI embedded demo? Could you post the whole page?

No, i am using PowerBI API and i received the access_token with a ajax request.

 

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.