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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
lwgoBiadmin
Frequent Visitor

Embed token expiration time concern

Hi All,

We are planning to cache token using redis, our concern is explained below.

     After generating the first token it will be stored in the cache and we will be using the same embed token until it expires.

     Scenario:   what if the report user access the report couple of minutes prior to the expiration of token and continue using the report after the expiration time. Will this intrupt them? Like displaying error messages.

Eg: the first token generated at 10am (suppose token expiration is 24 hours) and after 23.55 hours later again the report is accessed with the same token. The user continues to use the report after 24 hours.

 

Thanks

Neeraj

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @lwgoBiadmin ,

 

As far as I know, by default, the Azure token expiration time is one hour. There are two kind of embedding methods, embed for organization(user owns data)  and embed for customer (app owns data). 

Embed token should be used in app owns data. Power BI will generate embed tokens by Azure token generated by master account or service principal.

RicoZhou_0-1660628047429.png

For reference: Understand the permission tokens needed for embedding a Power BI application

If you get report before your token expired, you may still could see your report by cache. However, if you do some interaction on your report, your report will be broken due to token is expired. Then you need to get active embed token.

For refernece: Refresh the access token in Power BI embedded analytics | Microsoft Docs

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @lwgoBiadmin ,

 

As far as I know, by default, the Azure token expiration time is one hour. There are two kind of embedding methods, embed for organization(user owns data)  and embed for customer (app owns data). 

Embed token should be used in app owns data. Power BI will generate embed tokens by Azure token generated by master account or service principal.

RicoZhou_0-1660628047429.png

For reference: Understand the permission tokens needed for embedding a Power BI application

If you get report before your token expired, you may still could see your report by cache. However, if you do some interaction on your report, your report will be broken due to token is expired. Then you need to get active embed token.

For refernece: Refresh the access token in Power BI embedded analytics | Microsoft Docs

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @v-rzhou-msft.,

Thanks for the reply.

Currently we are generating embed tokens by Azure token generated by service principal and by using a policy in azure we are able to increase the expiration time to 24hrs. Now we are checking expiration time and  generating token 30 minutes before expiration time. So that will solve this problem.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.