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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
AlexGurovich
Helper II
Helper II

Add logout to iFrame of Power BI Service

Hi: 

 

I am exposing a report of my Power BI Service, in an iframe within a website ( for which the user needs to log in ). How can I add a "log out" button somewhere inside the iframe???? (or even outside the iframe, as long as it is visible to the user)

 

AlexGurovich_0-1629401226429.png

 

Regards, 

 

Alex Gurovich

 

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @AlexGurovich 

 

I found some useful information in some threads.

if visit "https://app.powerbi.com/Signout" , it will sign out the user of power bi, how about make a button which have hyperlink to the https://app.powerbi.com/Signout. When click the button, it will open a new tab and the current power bi page will signout in few seconds.  it can be achieved better by using js script to call a background http request to sign out.

<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Sign Out Power BI</title>
</head>

<body>
<script src="js/scripts.js"></script> 
<H1> Signout Test</H1>

<a href="https://app.powerbi.com/Signout" target='_blank'>
 <button type="button"> Signout Current User </button>
</a>
<br />

<iframe width="1140" height="541.25" src="https://app.powerbi.com/reportEmbed?reportId=XXX&autoAuth=true&ctid=XXX&config=XXX" frameborder="0" allowFullScreen="true"></iframe>

</body>
</html>

vangzhengmsft_0-1629789777248.png

 

https://community.powerbi.com/t5/Developer/Button-to-Sign-Off-URL-Filter/m-p/1094399

https://community.powerbi.com/t5/Service/Logging-out-of-embedded-app-powerbi-com-when-logging-out-of...

 

Hope this helps.

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @AlexGurovich 

 

I found some useful information in some threads.

if visit "https://app.powerbi.com/Signout" , it will sign out the user of power bi, how about make a button which have hyperlink to the https://app.powerbi.com/Signout. When click the button, it will open a new tab and the current power bi page will signout in few seconds.  it can be achieved better by using js script to call a background http request to sign out.

<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Sign Out Power BI</title>
</head>

<body>
<script src="js/scripts.js"></script> 
<H1> Signout Test</H1>

<a href="https://app.powerbi.com/Signout" target='_blank'>
 <button type="button"> Signout Current User </button>
</a>
<br />

<iframe width="1140" height="541.25" src="https://app.powerbi.com/reportEmbed?reportId=XXX&autoAuth=true&ctid=XXX&config=XXX" frameborder="0" allowFullScreen="true"></iframe>

</body>
</html>

vangzhengmsft_0-1629789777248.png

 

https://community.powerbi.com/t5/Developer/Button-to-Sign-Off-URL-Filter/m-p/1094399

https://community.powerbi.com/t5/Service/Logging-out-of-embedded-app-powerbi-com-when-logging-out-of...

 

Hope this helps.

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-angzheng-msft Thanks. I believe what you propose is the best thing that can be done without having to pay for the "Power BI Embedded" licence...

GilbertQ
Super User
Super User

Hi @AlexGurovich 

 

As far as I know this is not currently possible if you are using the Secure Embed option. If you are using Power BI Embedded you are then controlling the logging in and could have a button to log out of your application.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.