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

Get the accessToken of a client with Javascript

Hi,

 

I would like to get the accessToken of a client with Javascript if possible. 

 

I have his username, his password and the link for an emebbed report.

 

this is my link : https://app.powerbi.com/groups/me/reports/my-report-id?ctid=my-client-id

 

So with all these informations, can i get the access token so i can embed the report on my own ? 

 

I tried to use the javascript's code of "v-ljerr-msft" in this thread (https://community.powerbi.com/t5/Developer/get-Access-token-using-js/m-p/350294#M10396) but it doesn't work with my clientId. 

 

I get this error : 

 

AADSTS70001: Application with identifier my-client-id was not found in the directory my-directory
 
Can someone help me ?
 
Geoffrey 
1 REPLY 1
v-micsh-msft
Employee
Employee

Please first follow the steps below to register the App, then test it with PostMan to get the token:

https://community.powerbi.com/t5/Developer/How-To-Get-embed-token-using-Get-Post-only/m-p/294475

 

If that works, try to use the sample code to text again.

 

Regards,

Michael

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.