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
jcaffarel
Regular Visitor

REST API accessToken datasetId field

Hi,

 

I'm trying to set up a Power BI dashboard using NodeJS and ejs with the REST API. (https://stackoverflow.com/questions/47194412/node-js-app-integration-with-power-bi-rest-api)

 

I've managed to successfully login from my code and get the access token from 

 
To my understanding, after that, I need to get another access token from 
https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}, by means of setting an Authorization header like "Authorization" "Bearer {receivedToken}" and sending a GET request to that URL. The issue is that, after that request, I receive a response with fields such as:
 
@odata.context, id, webUrl, etc. but the only "new" field that I receive is a "datasetId". However, I can't seem to find the description of that field, but I assume is the accessToken that needs to be passed in the "config" object to the powerbi.embed(...., config) function. Am I right?
 
The problem is that on the webpage, a message of "This content is not available" is shown, and checking the console errors, I can see a 403 error for the resource: https://wabi-south-east-asia-redirect.analysis.windows.net/metadata/cluster
 
Is there something I'm missing? Any help would be greatly appreciated.
0 REPLIES 0

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.

Top Kudoed Authors