Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Applicable88
Impactful Individual
Impactful Individual

Auto sign in click on "Sign-in" if button appears in embedded report

Hello,

i embedded a iFrame of an report into a webpage. This report will be displayed as a standalone report for my colleagues and runs all the time on a display. I wrote a script part which tells the Iframe to refresh every 10 minutes. 

But seemingly still after a while the session gets a inherent system or session timeout. So the typical yellow "Sign - In Button" will emerge:

 

Applicable88_0-1652026536807.png

 

If I click on it, it shows that I'm actually not logged out, because it won't ask me for authentification again, instead it will just run the iFrame with the report right away. So since I don't need to re-enter my login data is there a way to write a short java script which just click on that yellow button automatically and re-run the report? Since the Sign'in button has its own class id, I hope its possible. 

 

Thank you very much in advance. 

Best. 

 

1 ACCEPTED SOLUTION

@v-chenwuz-msft thanks for your tip. I come to realization that its not possible to click on a button within a iframe from the "outside". Which means that the domain are different. 

View solution in original post

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @Applicable88,

 

Maybe you can try this code in a loop while the sign-in page is occurred to click the yellow button.

function click_yellow() { document.querySelector("#promptForLogin > button").click() }
click_yellow()

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chenwuz-msft thanks for your tip. I come to realization that its not possible to click on a button within a iframe from the "outside". Which means that the domain are different. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.