Could not load data for this visual: ClientError_TokenExpired

Why the token expires

When a user has a report open on screen for more than 1 hour without interacting with the report, the authentication token expires and you may see a "ClientError_TokenExpired" error message after that time.

If the user sees this error message, the solution is quite simple: just refresh the page and the report will be loaded again.

The Power BI Embedded token expires to maintain security and control who can access the reports. Since it allows temporary access, expiration prevents someone from continuing to use the system if the token is shared or accidentally exposed. Additionally, this measure ensures that if there are changes in permissions or the need to block access, this happens quickly without leaving loopholes.

By default, the Power BI Embedded API token is valid for 1 hour. This time is designed to be sufficient for a normal usage session, but short enough to avoid risks. If it is necessary to continue using the system after this period, a new token needs to be generated by the application. This keeps access always up to date and secure.

Automatic token refresh

Power Embedded has a feature that automatically refreshes access tokens when you interact with the report, such as applying a filter, switching a report page, or clicking on a visual.

However, if the user goes more than 1 hour without interacting with the report (e.g., a report displayed on a TV), the token may expire, showing the token expired error message and requiring you to refresh the page.

To resolve this issue, Power Embedded implemented timed token refresh.

Timed token refresh

To force the timed refresh of the Power Embedded authentication token, go to the Settings page.

On this screen, you have the option "Refresh Token every" x minutes. This option will cause Power Embedded to force the token refresh at the selected number of minutes.

If the user leaves the screen open without interacting with the report, the token may expire. Configuring this option allows the token to be refreshed periodically, preventing disconnections due to expiration, even if the report is idle.

How to configure timed token refresh

  1. Go to the Administration Portal.

  2. Navigate to the Settings page.

  3. Locate the option "Refresh token every".

  4. Set the desired time interval and click Save.

triangle-exclamation

Last updated