Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a sample app .sln that I downloaded from after registering an app in power bi embedded using User Owns Data Approach. The only thing I want to do with this is to show a report of mine in a smarttv and let the report be there forever without prompting for login ever again. So in my app's code I want to somehow refresh the access token periodically before it expires. I've seen the documentation: https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/refresh-token
I believe the section "Automatically refresh token example" is what I'm looking for but this isn't enough help for me, they provide an imcomplete "getNewAccessToken" that I have no idea how to complete or where to call it. I dont understand cs code or javascript, but with a bit of help I think I would be able to do this. Can I get any help from you?
Hi @sfdomingues
For security reasons, access tokens have a limited lifetime.
To maintain continuous access to Power BI reports without manual intervention, you need to implement a mechanism to automatically refresh the access token before it expires.
I found the following documentation for you that may be helpful.
What is the Power BI embedded analytics Client API | Microsoft Learn
reactjs - Refresh power bi client acces Token React - Stack Overflow
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
106 | |
86 | |
81 | |
73 | |
71 |
User | Count |
---|---|
112 | |
100 | |
98 | |
72 | |
66 |