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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
sbavana
New Member

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, this worked as expected. For example, setting "lifetimeInMinutes" to 720 would generate a valid token for 12 hours.

However, I have noticed that the API issues tokens now with a default validity of only 1 hour, even when we specify 720 minutes. This seems to be a change in behavior from the Microsoft Power BI API side.

FYI.,

API URL : https://api.powerbi.com/v1.0/myorg/GenerateToken
Method: POST
Authorization: Bearer xxxxxxxxxxxxx
Body : 

{
  "datasets": [
    {
      "id": "7f3ead21-29c8-4f48-b627-8aca9a8ebdd9"
    }
  ],
  "reports": [
    {
      "id": "056b09ff-844c-449a-9a09-974a1793abd5"
    }
  ],
  "identities": [
    {
      "username": "[email protected]",
      "roles": [
        "LE",
        "DFW"
      ],
      "datasets": [
        "7f3ead21-29c8-4f48-b627-8aca9a8ebdd9"
      ]
    }
  ],
  "lifetimeInMinutes": 720
}
1 ACCEPTED SOLUTION
Anonymous
Not applicable

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.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @sbavana ,
Has the issue been resolved on your end? If so, please share your solution and mark it as "Accept as Solution." This will assist others in the community who are dealing with similar problems and help them find a solution more quickly.
Thank you.

Anonymous
Not applicable

Hi @sbavana ,
I wanted to follow up on our previous suggestions regarding the issue you are facing. We would like to hear back from you to ensure we can assist you further. If our response has addressed your query, please accept it as a solution and give a ‘Kudos’ so other members can easily find it. 
Thank you

Anonymous
Not applicable

Hi @sbavana ,
I just wanted to kindly follow up to see if you had a chance to review the previous response provided by us. I hope it was helpful. If yes, please Accept the answer so that it will be helpful to others to find it quickly.
Thank you.

Anonymous
Not applicable

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.

Akash_Varuna
Super User
Super User

Hi @sbavana The documentation or API behavior may have been changed; did you check the Power BI API Documentation.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors