<?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: Display report using powerbi-client and react (typescript) in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Display-report-using-powerbi-client-and-react-typescript/m-p/390960#M11618</link>
    <description>&lt;P&gt;The property &lt;FONT face="courier new,courier"&gt;tokenType&lt;/FONT&gt; was missing from the config.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Apr 2018 07:55:28 GMT</pubDate>
    <dc:creator>Ameb</dc:creator>
    <dc:date>2018-04-06T07:55:28Z</dc:date>
    <item>
      <title>Display report using powerbi-client and react (typescript)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Display-report-using-powerbi-client-and-react-typescript/m-p/390273#M11598</link>
      <description>&lt;P&gt;Hello.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been working on a .NET Core application with React.&lt;/P&gt;&lt;P&gt;Server side works fine (tokens generated work on the powerbi javascript demo)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tokens from&amp;nbsp;&lt;A href="https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/" target="_self"&gt;PowerBI Javascript Demo&lt;/A&gt;&amp;nbsp; doesnt work on the client side (react component). Neither the tokens generated from my server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;GET https://wabi-north-europe-redirect.analysis.windows.net/metadata/cluster 403 (Forbidden)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have recreated a small application. Here is the component:&lt;/P&gt;&lt;PRE&gt;import * as React from 'react';
import * as pbi from 'powerbi-client';

export default class App extends React.Component&amp;lt;{}, {}&amp;gt; {
    private powerbi: pbi.service.Service;
    private embedContainer: HTMLDivElement;
    constructor(props: {}) {
        super(props);
        this.powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);
    }
    public render() {
        return (
                &amp;lt;div className="embedContainer" powerbi-type="report" style={{'height' : '600px', 'width' : '100%'}} ref={(div) =&amp;gt; { if (div) {this.embedContainer = div; }}}/&amp;gt;
        );
    }
    componentDidMount() {
        // console.log(this.props);
        let config = {
            'accessToken': '',
            'embedUrl':  '',
            'id': ''
        };
        console.log(config);
        this.powerbi.embed(this.embedContainer, config);
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would love to share a repo with the code, but i think is not allowed (my posts are being deleted without reason/ private message)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 10:14:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Display-report-using-powerbi-client-and-react-typescript/m-p/390273#M11598</guid>
      <dc:creator>Ameb</dc:creator>
      <dc:date>2018-04-05T10:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Display report using powerbi-client and react (typescript)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Display-report-using-powerbi-client-and-react-typescript/m-p/390960#M11618</link>
      <description>&lt;P&gt;The property &lt;FONT face="courier new,courier"&gt;tokenType&lt;/FONT&gt; was missing from the config.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 07:55:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Display-report-using-powerbi-client-and-react-typescript/m-p/390960#M11618</guid>
      <dc:creator>Ameb</dc:creator>
      <dc:date>2018-04-06T07:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Display report using powerbi-client and react (typescript)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Display-report-using-powerbi-client-and-react-typescript/m-p/471288#M14461</link>
      <description>&lt;P&gt;Hello Ameb,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you mind sharing working source code or project files?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 07:22:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Display-report-using-powerbi-client-and-react-typescript/m-p/471288#M14461</guid>
      <dc:creator>amoldhaygude</dc:creator>
      <dc:date>2018-07-25T07:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Display report using powerbi-client and react (typescript)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Display-report-using-powerbi-client-and-react-typescript/m-p/472428#M14502</link>
      <description>&lt;P&gt;I am no longer working on this so can't clean the code properly or give you a detailed or simplified working code, but i uploaded what i had. Hope it helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Ameb/PBIEmbedded-NetCore-React-Demo" target="_blank"&gt;https://github.com/Ameb/PBIEmbedded-NetCore-React-Demo&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Most of my issues with this were the matching between the config used with the embedding API and the way the tokens were generated (&lt;A href="https://community.powerbi.com/t5/Developer/oauth-token-as-AAD-embed-token-API-via-AAD/m-p/412551/highlight/true#M12288" target="_self"&gt;since you can actually use an AD bearer token for embedding&lt;/A&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 08:24:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Display-report-using-powerbi-client-and-react-typescript/m-p/472428#M14502</guid>
      <dc:creator>Ameb</dc:creator>
      <dc:date>2018-07-26T08:24:49Z</dc:date>
    </item>
  </channel>
</rss>

