<?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: PowerBiClient object accessing exception in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/PowerBiClient-object-accessing-exception/m-p/292411#M8597</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/45576"&gt;@bhagya&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am facing the&amp;nbsp; exception while creating the PowerBiClient Object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By looking the solution in one of the forum , i have added the redirecting dependecy aw well.&amp;nbsp; but still facing this issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Task&amp;lt;AuthenticationResult&amp;gt; tokenAccessKey = Program.GetToken();&lt;BR /&gt;var tokenCredentials = new TokenCredentials(tokenAccessKey.Result.AccessToken, tokenAccessKey.Result.AccessTokenType);&lt;/P&gt;
&lt;P&gt;using (var client = new PowerBIClient(new Uri(ApiUrl), tokenCredentials))&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Questions:&amp;nbsp; is these below making this problem&lt;/P&gt;
&lt;P&gt;1. What should be my ApiUrl ? ex: "&lt;A href="https://app.powerbi.com/" target="_blank"&gt;https://app.powerbi.com/&lt;/A&gt;"&lt;/P&gt;
&lt;P&gt;2. my tokenCredentials object's Client ID and Tenent Id returning null. event though the tokenAccessKey&amp;nbsp; is valid&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Power BI client issue.png" style="width: 498px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/66970i8699CD68B1B67DE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Power BI client issue.png" alt="Power BI client issue.png" /&gt;&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/45576"&gt;@bhagya&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Yes, the ApiUrl is "&lt;A href="https://api.powerbi.com/" target="_blank"&gt;https://api.powerbi.com/&lt;/A&gt;".&lt;/P&gt;
&lt;P&gt;As to the null values, the probable reason is the not well installed Newtonsoft.Json. Try to uninstall and reinstall it following &lt;A href="https://stackoverflow.com/questions/32794225/could-not-load-file-or-assembly-newtonsoft-json-version-7-0-0-0" target="_self"&gt;this thread&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2017 08:38:26 GMT</pubDate>
    <dc:creator>Eric_Zhang</dc:creator>
    <dc:date>2017-10-30T08:38:26Z</dc:date>
    <item>
      <title>PowerBiClient object accessing exception</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBiClient-object-accessing-exception/m-p/292091#M8580</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing the&amp;nbsp; exception while creating the PowerBiClient Object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By looking the solution in one of the forum , i have added the redirecting dependecy aw well.&amp;nbsp; but still facing this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Task&amp;lt;AuthenticationResult&amp;gt; tokenAccessKey = Program.GetToken();&lt;BR /&gt;var tokenCredentials = new TokenCredentials(tokenAccessKey.Result.AccessToken, tokenAccessKey.Result.AccessTokenType);&lt;/P&gt;&lt;P&gt;using (var client = new PowerBIClient(new Uri(ApiUrl), tokenCredentials))&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Questions:&amp;nbsp; is these below making this problem&lt;/P&gt;&lt;P&gt;1. What should be my ApiUrl ? ex: "&lt;A href="https://app.powerbi.com/" target="_blank"&gt;https://app.powerbi.com/&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;2. my tokenCredentials object's Client ID and Tenent Id returning null. event though the tokenAccessKey&amp;nbsp; is valid&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Power BI client issue.png" style="width: 498px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/66970i8699CD68B1B67DE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Power BI client issue.png" alt="Power BI client issue.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Oct 2017 07:17:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBiClient-object-accessing-exception/m-p/292091#M8580</guid>
      <dc:creator>bhagya</dc:creator>
      <dc:date>2017-10-29T07:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBiClient object accessing exception</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBiClient-object-accessing-exception/m-p/292411#M8597</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/45576"&gt;@bhagya&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am facing the&amp;nbsp; exception while creating the PowerBiClient Object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By looking the solution in one of the forum , i have added the redirecting dependecy aw well.&amp;nbsp; but still facing this issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Task&amp;lt;AuthenticationResult&amp;gt; tokenAccessKey = Program.GetToken();&lt;BR /&gt;var tokenCredentials = new TokenCredentials(tokenAccessKey.Result.AccessToken, tokenAccessKey.Result.AccessTokenType);&lt;/P&gt;
&lt;P&gt;using (var client = new PowerBIClient(new Uri(ApiUrl), tokenCredentials))&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Questions:&amp;nbsp; is these below making this problem&lt;/P&gt;
&lt;P&gt;1. What should be my ApiUrl ? ex: "&lt;A href="https://app.powerbi.com/" target="_blank"&gt;https://app.powerbi.com/&lt;/A&gt;"&lt;/P&gt;
&lt;P&gt;2. my tokenCredentials object's Client ID and Tenent Id returning null. event though the tokenAccessKey&amp;nbsp; is valid&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Power BI client issue.png" style="width: 498px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/66970i8699CD68B1B67DE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Power BI client issue.png" alt="Power BI client issue.png" /&gt;&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/45576"&gt;@bhagya&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Yes, the ApiUrl is "&lt;A href="https://api.powerbi.com/" target="_blank"&gt;https://api.powerbi.com/&lt;/A&gt;".&lt;/P&gt;
&lt;P&gt;As to the null values, the probable reason is the not well installed Newtonsoft.Json. Try to uninstall and reinstall it following &lt;A href="https://stackoverflow.com/questions/32794225/could-not-load-file-or-assembly-newtonsoft-json-version-7-0-0-0" target="_self"&gt;this thread&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 08:38:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBiClient-object-accessing-exception/m-p/292411#M8597</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-10-30T08:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBiClient object accessing exception</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBiClient-object-accessing-exception/m-p/294821#M8679</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I faced this issue becasue of version conflict of Newtonsoft.Json between "6.0.0.0" and "7.0.0.0"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Download 7.0.0.0 from nuget and add in webconfig. started working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 07:31:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBiClient-object-accessing-exception/m-p/294821#M8679</guid>
      <dc:creator>bhagya</dc:creator>
      <dc:date>2017-11-02T07:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBiClient object accessing exception</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBiClient-object-accessing-exception/m-p/1223408#M24743</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/45576"&gt;@bhagya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know it has been a while, but I am getting this error when running the powershell cmdlet&lt;/P&gt;&lt;P&gt;Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxx' or one of its dependencies. The system cannot&lt;BR /&gt;find the file specified.&lt;BR /&gt;At line:1 char:1&lt;BR /&gt;+ get-PowerBIWorkspace -All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You mentioned that you Download 7.0.0.0 from nuget and add in webconfig.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How did you do that? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sorry if it sounds silly, but I am a newbie&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 04:57:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBiClient-object-accessing-exception/m-p/1223408#M24743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-15T04:57:40Z</dc:date>
    </item>
  </channel>
</rss>

