Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I'm trying to implement auto-refresh of EmbedToken from clientside javascript through an ASP.NET Core backend.
Clientside I'm using the 'Refresh token using JavaScript SDK example' for setting a timer to call the backend:
https://github.com/microsoft/PowerBI-JavaScript/wiki/Refresh-token-using-JavaScript-SDK-example
The ASP.NET Core backend uses Microsoft.PowerBI.Api Nuget package for doing the call to retrieve new embed tokens for the user - through the client.Reports.GenerateTokenInGroupAsync method.
However, when the new token is generated the response does not contain an updated 'Expiration'. Please see screenshots of the code running:
The first and the second screenshot was taken with some minutes apart. As you can see the Token and TokenId are updated, however the Expiration stays exactly the same down to the second:
This makes the clientside code unusable since it checks against the updated Expiration, it will go into a loop of trying to update the token.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.