<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PowerBI Embed Issue in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Embed-Issue/m-p/450150#M13838</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/9479"&gt;@moizsherwani&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As we can see from the error message, it seems not the issues caused by Power BI. Please refer to&amp;nbsp;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS" target="_self"&gt;docs/Web/HTTP/CORS&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin" target="_self"&gt;Headers/Access-Control-Allow-Origin&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;I would suggest you mask these ids in your post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Dale&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jun 2018 08:33:00 GMT</pubDate>
    <dc:creator>v-jiascu-msft</dc:creator>
    <dc:date>2018-06-28T08:33:00Z</dc:date>
    <item>
      <title>PowerBI Embed Issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Embed-Issue/m-p/449435#M13817</link>
      <description>&lt;P&gt;We need to embed a powerBI report into our website dashboard.&lt;/P&gt;&lt;P&gt;To access a powerBI report, the user needs to be authorized and authenticated.&lt;/P&gt;&lt;P&gt;For this we authenticate the user using Microsoft Office 365 Online Services, using the code below:&lt;/P&gt;&lt;P&gt;var settings = {&lt;BR /&gt;"async": true,&lt;BR /&gt;"crossDomain": true,&lt;BR /&gt;"url": "&lt;A href="https://login.microsoftonline.com/6c7d5dfa-3948-4782-b5a0-6fd1b2825ae3/oauth2/token" target="_blank"&gt;https://login.microsoftonline.com/6c7d5dfa-3948-4782-b5a0-6fd1b2825ae3/oauth2/token&lt;/A&gt;",&lt;BR /&gt;"method": "POST",&lt;BR /&gt;"headers": {&lt;BR /&gt;"Content-Type": "application/x-www-form-urlencoded",&lt;BR /&gt;"Cache-Control": "no-cache",&lt;BR /&gt;},&lt;BR /&gt;"data": {&lt;BR /&gt;"grant_type": "password",&lt;BR /&gt;"scope": "openid",&lt;BR /&gt;"resource": "&lt;A href="https://analysis.windows.net/powerbi/api" target="_blank"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;",&lt;BR /&gt;"client_id": "e701f962-2236-434d-8974-19b649b34590",&lt;BR /&gt;"username": "w******@exceedgulf.com",&lt;BR /&gt;"password": "**********"&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;$.ajax(settings).done(function (response) {&lt;BR /&gt;console.log(response);&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;Above code snippet works fine if we access using local machine, or a developer tool like Fiddler or Postman. But when we deploy the same code on our website which is hosted on Azure with a custom domain associated with it. We get an error related to&lt;/P&gt;&lt;P&gt;"Failed to load &lt;A href="https://login.microsoftonline.com/...../oauth/token" target="_blank"&gt;https://login.microsoftonline.com/...../oauth/token&lt;/A&gt;: Resposne to preflight request does not pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '&lt;A href="https://exoppdev.azurewebsites.net" target="_blank"&gt;https://exoppdev.azurewebsites.net&lt;/A&gt;' is therefore not allowed access.&lt;/P&gt;&lt;P&gt;After investigating from multiple blogs and forums, we almost tried every resolution that can possibly resolve the issue but till not we are not able to load the report from online hosted environment.&lt;/P&gt;&lt;P&gt;Need help regarding above issue.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 13:50:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Embed-Issue/m-p/449435#M13817</guid>
      <dc:creator>moizsherwani</dc:creator>
      <dc:date>2018-06-27T13:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBI Embed Issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Embed-Issue/m-p/450150#M13838</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/9479"&gt;@moizsherwani&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As we can see from the error message, it seems not the issues caused by Power BI. Please refer to&amp;nbsp;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS" target="_self"&gt;docs/Web/HTTP/CORS&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin" target="_self"&gt;Headers/Access-Control-Allow-Origin&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;I would suggest you mask these ids in your post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Dale&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 08:33:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Embed-Issue/m-p/450150#M13838</guid>
      <dc:creator>v-jiascu-msft</dc:creator>
      <dc:date>2018-06-28T08:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBI Embed Issue</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Embed-Issue/m-p/450205#M13841</link>
      <description>&lt;P&gt;The CORS problem is not on our side, but on the Microsoft end.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are the Calling party, so we cannot set the response headers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We make call to Microsoft online rest api services, and it works locally and not from domain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var settings = {&lt;/P&gt;&lt;P&gt;"async": true,&lt;/P&gt;&lt;P&gt;"crossDomain": true,&lt;/P&gt;&lt;P&gt;"url": "&lt;A href="https://login.microsoftonline.com/6c7d5dfa-3948-4782-b5a0-6fd1b2825ae3/oauth2/token" target="_blank"&gt;https://login.microsoftonline.com/6c7d5dfa-3948-4782-b5a0-6fd1b2825ae3/oauth2/token&lt;/A&gt;",&lt;/P&gt;&lt;P&gt;"method": "POST",&lt;/P&gt;&lt;P&gt;"headers": {&lt;/P&gt;&lt;P&gt;"Content-Type": "application/x-www-form-urlencoded",&lt;/P&gt;&lt;P&gt;"Cache-Control": "no-cache",&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;"data": {&lt;/P&gt;&lt;P&gt;"grant_type": "password",&lt;/P&gt;&lt;P&gt;"scope": "openid",&lt;/P&gt;&lt;P&gt;"resource": "&lt;A href="https://analysis.windows.net/powerbi/api" target="_blank"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;",&lt;/P&gt;&lt;P&gt;"client_id": "e701f962-2236-434d-8974-19b649b34590",&lt;/P&gt;&lt;P&gt;"username": "w******@exceedgulf.com",&lt;/P&gt;&lt;P&gt;"password": "**********"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 09:07:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Embed-Issue/m-p/450205#M13841</guid>
      <dc:creator>moizsherwani</dc:creator>
      <dc:date>2018-06-28T09:07:23Z</dc:date>
    </item>
  </channel>
</rss>

