Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
97 | |
86 | |
43 | |
40 | |
35 |