Forum Discussion

sbavana's avatar
sbavana
New Member
1 year ago
Solved

Power BI Embedded API Ignoring lifetimeInMinutes Parameter – Token Expiring After 1 Hour Regardless

Regarding the token expiry issue, we typically generate client tokens using the Microsoft Power BI Embedded API by specifying the required duration using the "lifetimeInMinutes" parameter. Previously...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi sbavana ,
    Thank you Akash_Varuna  for the prompt response!

    Thank you for sharing the details.

    The lifetimeInMinutes parameter can shorten a token’s lifespan but may not extend it beyond the 1-hour maximum, which is enforced by the underlying Azure AD token. Even with 720 minutes specified, the token will expire after 60 minutes unless paired with a capacity-based setup (e.g., A SKUs or Premium) and custom refresh or Azure AD policy adjustments.

    Please follow below as a workaround :
    - Implement a token refresh mechanism in your app to generate a new token before expiry, ensuring seamless access.
    - Consider Power BI Embedded (A SKUs) or Premium capacities (EM/P SKUs) for more flexibility and control over embedding sessions.
    Please refer the link https://community.fabric.microsoft.com/t5/Service/PowerBI-Embed-token-limit/m-p/4591883 

    For more details, see Microsoft official documentation: https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/generate-token 

    If this asnwer found helpful,consider accepting it as solution.

    Regards,
    Pallavi.