Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
hi,
i want to change the 60min timeout limit on my power bi embed tokens.
this is how i get my token:
PBIReport pbiReport = new PBIReport();
var generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: tokenAccessLevel, datasetId: pbiReport.DatasetId, allowSaveAs: allowSaveAs);
pbiReport.EmbedToken = typeof(PowerBIClient) client.Reports.GenerateTokenInGroup(groupId, reportId, generateTokenRequestParameters);
but i cant change the duration....where can i set it?
Hi @Muesli,
I checked the corresponding rest API but not found any related option to allow you to increase the expiry time of the token. So I think you can't directly use this rest API to achieve your requirement.
For your scenarios, I think you can research in two directions.
First, power bi embed tokens are generated from the azure side. AFAIK, azure has a token lifetime configuration menu for its tokens, you can check them to confirm if they provide the options to modify the lifetime of embed tokens.
Configurable token lifetimes in Microsoft identity platform (Preview)
Second, you can consider using programming codes to achieve auto-replace expired tokens to indirectly increase the embed contents usage lifetimes. (e.g. stored respond token and expired time into the session or other variables, then you can add a looping timer to check if this token expired and re-invoke the generated token API to get the new token for the following usage)
Hope above helps for your requirement.
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |