Atualização de token
Last updated
Last updated
Why Does the Token Expire?
When a user leaves the report screen open 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 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 reports. Since it allows temporary access, expiration prevents someone from continuing to use the system if the token is shared or exposed accidentally. Additionally, this measure ensures that if there are changes in permissions or a need to block access, it happens quickly without leaving gaps.
By default, the Power BI Embedded API token is valid for 1 hour. This time is considered 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 updated and secure.
Power Embedded has a feature that automatically updates 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 remains inactive for more than 1 hour without interacting with the report (e.g., a report on a TV), the token may expire, show an expired token error message, and you will need to update the page.
To solve this problem, Power Embedded implemented timed token updates.
To force timed updates of the Power Embedded authentication token, access the Settings page.
On this screen, there is the option to "Update Token every" x minutes. This option will cause Power Embedded to force token updates at the selected minute interval.
If the user leaves the screen open without interacting with the report, the token may expire. Configuring this option allows the token to be updated periodically, preventing disconnections due to expiration, even if the report is idle.
Access the Admin Portal.
Navigate to the Settings page.
Find the "Update Token every" option.
Define the desired time interval and click Save.
Note: If you have configured the capability to turn off automatically based on X minutes of inactivity, this configuration will prevent the capability from being turned off. An alternative is to configure that only some users can turn on or keep the capability on.