Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I successfully embed a report into my application using javascript. But I have to update embedded token manually every time.
Now I want to call rest API from my code so that token update automatically.
How to call API from my code to generate token and how to update token when it's going to expire?
My code is :
In general, it is insecure to generate embed tokens directly from the client. To do so you would need to pass a highly-priveldged access token back to the browser which is big security risk. Instead, create an server-side API for embed token renewal and have code in the browser call this servier-side API. With this design the application secret for your Azure AD application and the highly-priveldged access tokens all remain on the server and are never passed to the browser. Yes, it is more work but it's the only way to maintain a secure application.
Yes, I'm also looking for a solution to this problem
Not sure if this works anymore, but here goes: https://community.powerbi.com/t5/Developer/get-Access-token-using-js/m-p/350294
yes, I do that but there is a problem over there. We made this solution for almost 1000 users so I want to remove that login popup because I don't want to share credentials with every user. Is there any solution for that?
Were you able to find any solution.
If yes please post here, I am looking for the same thing.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |