Forum Discussion
How to make function "download pbix file" in javascript??
- 3 years ago
Hi ryankang ,
Embedding and interacting with Power BI content (reports, dashboards and tiles) requires an access token. The access token can be either an Azure AD token, when embedding for your organization, or an embed token, when embedding for your customers. The access token has an expiration time, which means that after embedding a Power BI item, you have a limited amount of time to interact with it. To give your users a continuous experience, refresh (or renew) the access token before it expires.
There are two ways to refresh your access token:
- Directly using the API
setAccessToken - Automatically if you're using an Azure AD token for embed for your organization
For more details, please refer to:
Refresh the access token in Power BI embedded analytics | Microsoft Learn
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Directly using the API
Hi ryankang ,
Embedding and interacting with Power BI content (reports, dashboards and tiles) requires an access token. The access token can be either an Azure AD token, when embedding for your organization, or an embed token, when embedding for your customers. The access token has an expiration time, which means that after embedding a Power BI item, you have a limited amount of time to interact with it. To give your users a continuous experience, refresh (or renew) the access token before it expires.
There are two ways to refresh your access token:
- Directly using the API
setAccessToken - Automatically if you're using an Azure AD token for embed for your organization
For more details, please refer to:
Refresh the access token in Power BI embedded analytics | Microsoft Learn
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-jianboli-msft
I could make REST API code, and i can download pbix file on the website by pushing button.
but i dont get the way how to make auth token "Export report" automatically following the picture.
lastly, i can make that token automatically.. it would be the best 🙂
thank you for replying so fast..