Forum Discussion

ryankang's avatar
ryankang
Frequent Visitor
3 years ago
Solved

How to make function "download pbix file" in javascript??

Hello. I just made code to show on the website but i want to make another function..  1) First, upload pbix file by using button or something if anyone who is authorized by login function.. or so...
  • v-jianboli-msft's avatar
    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 APIsetAccessToken
    • 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.