Forum Discussion
PowerBI Embedded: Embed Token Expiration?
There seems not way to change the expiration span, the demo shows it in 5 mintues.
- daniel1210 years agoAdvocate II
Well you can set the expiration span as it's described here: https://azure.microsoft.com/en-us/documentation/articles/power-bi-embedded-app-token-flow/ (search for exp). But my question is more about best practices around how the embedding application can catch a situation where the report embed token has already expired and must be refreshed. Currently when you hit a dashboard where the token has already expired it just shows ugly errors.
Thanks
Daniel
- ThomasDay10 years agoImpactful Individual
daniel12 did you find out a way to prevent the ugly errors? Here's what my embedded site looks like after a short time (sometimes 3 minutes--sometimes somewhat longer) if I select a new report tab. Spectacularly awful, no? Any ideas here?
- wabreza10 years agoMicrosoft Employee
In a server generated app you can get around this by generating a token for each render of the page.
In a single page app (SPA) - one option is to set a client-side timer on your page/view that is shorter than your token expiration. At that point you can regenerate the token and reload the report passing in the new access token.