Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Solved! Go to Solution.
Hi, @sajjadniazi
You can refer to the following documentation to listen for events after this report is loaded in JavaScript
How to handle events in a Power BI embedded analytics application | Microsoft Learn
When the session is about to expire, you can request a new token, you can refer to the JavaScript method in the following document to obtain it:
Refresh the access token in Power BI embedded analytics | Microsoft Learn
In addition, if you want to listen to the user's actions on the report, you can use the following Javascript functions:
How to handle events in a Power BI embedded analytics application | Microsoft Learn
Use these methods above to implement your needs. If you want to listen to these events globally, you need to use in JavaScript you can use:
window.addEventListener('click', function(event) {
console.log('Global click event triggers');
});
Window addEventListener() Method (w3schools.com)
This listens for global events, places the methods provided by the previous Power BI JavaScript into your global events, and sets the listening interval to ensure that the session doesn't time out back.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @sajjadniazi
You can refer to the following documentation to listen for events after this report is loaded in JavaScript
How to handle events in a Power BI embedded analytics application | Microsoft Learn
When the session is about to expire, you can request a new token, you can refer to the JavaScript method in the following document to obtain it:
Refresh the access token in Power BI embedded analytics | Microsoft Learn
In addition, if you want to listen to the user's actions on the report, you can use the following Javascript functions:
How to handle events in a Power BI embedded analytics application | Microsoft Learn
Use these methods above to implement your needs. If you want to listen to these events globally, you need to use in JavaScript you can use:
window.addEventListener('click', function(event) {
console.log('Global click event triggers');
});
Window addEventListener() Method (w3schools.com)
This listens for global events, places the methods provided by the previous Power BI JavaScript into your global events, and sets the listening interval to ensure that the session doesn't time out back.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
5 | |
3 | |
3 | |
2 | |
2 |
User | Count |
---|---|
9 | |
3 | |
3 | |
2 | |
2 |