title: Auto Sign-In to Power BI through code so as the report is visible in 'Secure Embed Code'
body: <p><strong>Issue:</strong></p>
  
  <p>On several ios devices, after clicking on 'Sign-In' button within the iframe(having src as Power BI report 'Secure Embed Code'), a new window opens to sign in to Power BI and after successful sign in, the window closes. <strong>However, iframe does not get reloaded. A manual intervention to reload the page is required to view the report. This exists on several ios devices (irrespective of the browser chrome or safari).</strong></p>
  
  <p><strong>Implementation:</strong> </p>
  
  <p>We have a web application using Azure AD Authentication, in this web application, we are embedding the Power BI reports with the help of 'Secure Embed Code' in an iframe.</p>
  
  <p><strong>Current Workflow:</strong> </p>
  
  <p>1) User sign in to the web application -></p>
  
  <p>2) Iframe (having secure embed code) is displayed with a <strong><em>Sign-In</em></strong> button -></p>
  
  <p>3) User clicks on <strong>'Sign-In'</strong> button within the iframe -></p>
  
  <p>4) A new window opens for few seconds to log in to Power BI Services -></p>
  
  <p>5) This new window closes automatically after successful login to Power BI Service -></p>
  
  <p>6) Iframe reloads and report is displayed</p>
  
  <p>This flow works fine for Windows and Android devices. However, for several ios devices, Step#6(Iframe reload) does not work. </p>
  
  <p>I am aware of the limitation of 'Secure Embed code' as</p>
  
  <blockquote>
    <p>Some browsers require you to refresh the page after sign-in, especially when using InPrivate or InCognito modes.</p>
  </blockquote>
  
  <p>Refer Limitations section of <a href="https://powerbi.microsoft.com/en-us/blog/easily-embed-secure-power-bi-reports-in-your-internal-portals-or-websites/" rel="nofollow noreferrer">link</a> for details.</p>
  
  <p><strong>Required Functionality:</strong> </p>
  
  <p>After sign-in to the application, before rendering of any iframe, a link should be provided which generates a new window and prompt user to sign in into the Power BI Services. After successful SignIn in the new window, a message should be passed to the previous window that 'signIn is successful' and the new window should be closed. Once our application receives this message 'signIn is successful', then the iframe should be rendered. This will help us resolve the issue that exists in ios devices.</p>
  
  <p><strong>Note: We do not want to use 'App Owns Data/User Owns Data' approach as these approaches require to purchase dedicated capacity for production.</strong></p>
  
  <p><em><strong>Please suggest if this is possible and provide some reference as to how could we achieve this. 
  Or suggest if there is any other workaround to resolve the issue.</strong></em></p>
  
  <p>Any help will be greatly appreciated.</p>
  
  <p>Thanks</p>