<?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: Authorization and Access Code workflow for ASP.NET MVC using PowerBI.com in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Authorization-and-Access-Code-workflow-for-ASP-NET-MVC-using/m-p/178062#M5763</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/6971"&gt;@Eric_Zhang&lt;/a&gt;&lt;/P&gt;&lt;P&gt;The issue is not with how to embed using javascript api once I have an access token. Rather, it's with obtaining the authorization code and/or access code from AAD after having successfully logged into my MVC5 intranet app via integrated windows authentication. In essence, I've authenticated against my local AD, but it's unclear how that SSO experience is carried through to AAD when requesting the authorization code or access token.&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2017 12:37:02 GMT</pubDate>
    <dc:creator>jgermain</dc:creator>
    <dc:date>2017-05-18T12:37:02Z</dc:date>
    <item>
      <title>Authorization and Access Code workflow for ASP.NET MVC using PowerBI.com</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authorization-and-Access-Code-workflow-for-ASP-NET-MVC-using/m-p/175920#M5717</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm developing a web app that will render embedded reports&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* using &lt;STRONG&gt;PowerBI.com&lt;/STRONG&gt;, NOT&amp;nbsp;Azure Embedded&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* &lt;/SPAN&gt;&lt;A href="http://asp.net/" target="_blank"&gt;ASP.NET&lt;/A&gt;&lt;SPAN&gt; MVC5 web application&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* using powerbi javascript api&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* intranet application&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;using on-premise Integrated Windows Authentication&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* Must support SSO&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* all users will be Pro users&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Trying to follow this&amp;nbsp;ASP.NET sample (&lt;A title="authenticate a web app" href="https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-authenticate-a-web-app/" target="_blank"&gt;authenticate a web app&lt;/A&gt;) and translate to MVC5 however I can't get things to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* When user logs into my app (IWA)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*&amp;nbsp;Get Authorization Code from AAD &lt;EM&gt;- this returns an HTML login page markup.&amp;nbsp;Can't I use something in Microsoft.IdentityModel.Clients.ActiveDirectory for this?&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* Get AAD AccessToken using code returned from above step to call AuthenticationContext.AcquireTokenByAuthorizationCode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* pass access token to view&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* view uses token to initialize report via powerbi javascript api following steps &lt;A title="Embedding Basics - PowerBI.com" href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embedding-Basics#powerbicom" target="_blank"&gt;here for PowerBI.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help or insights on this would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 22:17:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authorization-and-Access-Code-workflow-for-ASP-NET-MVC-using/m-p/175920#M5717</guid>
      <dc:creator>jgermain</dc:creator>
      <dc:date>2017-05-15T22:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization and Access Code workflow for ASP.NET MVC using PowerBI.com</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authorization-and-Access-Code-workflow-for-ASP-NET-MVC-using/m-p/177641#M5752</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/23413"&gt;@jgermain&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;I'm developing a web app that will render embedded reports&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* using &lt;STRONG&gt;PowerBI.com&lt;/STRONG&gt;, NOT&amp;nbsp;Azure Embedded&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* &lt;/SPAN&gt;&lt;A href="http://asp.net/" target="_blank"&gt;ASP.NET&lt;/A&gt;&lt;SPAN&gt; MVC5 web application&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* using powerbi javascript api&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* intranet application&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;using on-premise Integrated Windows Authentication&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* Must support SSO&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* all users will be Pro users&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Trying to follow this&amp;nbsp;ASP.NET sample (&lt;A title="authenticate a web app" href="https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-authenticate-a-web-app/" target="_blank"&gt;authenticate a web app&lt;/A&gt;) and translate to MVC5 however I can't get things to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* When user logs into my app (IWA)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*&amp;nbsp;Get Authorization Code from AAD &lt;EM&gt;- this returns an HTML login page markup.&lt;STRONG&gt;&amp;nbsp;Can't I use something in Microsoft.IdentityModel.Clients.ActiveDirectory for this?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* Get AAD AccessToken using code returned from above step to call AuthenticationContext.AcquireTokenByAuthorizationCode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* pass access token to view&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* view uses token to initialize report via powerbi javascript api following steps &lt;A title="Embedding Basics - PowerBI.com" href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embedding-Basics#powerbicom" target="_blank"&gt;here for PowerBI.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Any help or insights on this would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/23413"&gt;@jgermain&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://github.com/Microsoft/PowerBI-CSharp/tree/master/samples/webforms" target="_self"&gt;demo on github&lt;/A&gt; from your link actually uses the name space&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Microsoft.IdentityModel.Clients.ActiveDirectory. &lt;/STRONG&gt;What is your concern on this?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know about MVC5, however embeding a report from Power BI.com can be as easy as using a static HTML. You just need to get the access token from backend.&lt;/P&gt;
&lt;PRE&gt;&amp;lt;html&amp;gt;

 &amp;lt;script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"&amp;gt;&amp;lt;/script&amp;gt;
 
&amp;lt;script type="text/javascript"&amp;gt;
window.onload = function () {  
 

var embedConfiguration = {
    type: 'report',
    accessToken: 'eyJ0eX....your token here',
    embedUrl: 'https://app.powerbi.com/reportEmbed?reportId=8067fc7f-06axxxxxxxxxxxxxx' 

}; 
 

var $reportContainer = $('#reportContainer');
 
var report = powerbi.embedNew($reportContainer.get(0), embedConfiguration);
 
}
&amp;lt;/script&amp;gt;

&amp;lt;div id="reportContainer" &amp;gt;&amp;lt;/div&amp;gt;

&amp;lt;/html&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 02:30:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authorization-and-Access-Code-workflow-for-ASP-NET-MVC-using/m-p/177641#M5752</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-05-18T02:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Authorization and Access Code workflow for ASP.NET MVC using PowerBI.com</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Authorization-and-Access-Code-workflow-for-ASP-NET-MVC-using/m-p/178062#M5763</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/6971"&gt;@Eric_Zhang&lt;/a&gt;&lt;/P&gt;&lt;P&gt;The issue is not with how to embed using javascript api once I have an access token. Rather, it's with obtaining the authorization code and/or access code from AAD after having successfully logged into my MVC5 intranet app via integrated windows authentication. In essence, I've authenticated against my local AD, but it's unclear how that SSO experience is carried through to AAD when requesting the authorization code or access token.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 12:37:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Authorization-and-Access-Code-workflow-for-ASP-NET-MVC-using/m-p/178062#M5763</guid>
      <dc:creator>jgermain</dc:creator>
      <dc:date>2017-05-18T12:37:02Z</dc:date>
    </item>
  </channel>
</rss>

