Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Expiration not updated when retrieving new EmbedToken with client.Reports.GenerateTokenInGroupAsync

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:

PowerBIEmbeddedToken_1.png

 

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:

 

PowerBIEmbeddedToken_2.png

 

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.

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @rfolkes

 

I would suggest you create a support ticket to get help. 

 

Support Ticket.gif

 

Best Regards,
Qiuyun Yu