<?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 Client issue (&amp;quot;element as type incompatible with the array&amp;quot;) after SharePoint in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Client-issue-quot-element-as-type-incompatible-with-the/m-p/2573895#M36652</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/398808"&gt;@bartp&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What kind of embedding method are you choosing to use in Sharepoint 2016, publish to web?&lt;/P&gt;
&lt;P&gt;As far as I know, the classic SharePoint Server is not supported with embedding to SharePoint Online.&lt;/P&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-embed-report-spo" target="_self"&gt;Known issues and limitations&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;According to your screenshot, I think there should be something wrong in a&lt;SPAN&gt;uthentication. I think you can try to delete the cache , then get the embed code and bear token and try again.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is a solved post with similar problem like yours, I hope it could help you solve your problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For reference:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Power-Query/Embed-Power-BI-report-on-SharePoint-on-prem-page-SP-List-as-data/td-p/497763" target="_self"&gt;Embed Power BI report on SharePoint on-prem page, SP List as data source &amp;amp;amp; repeatable deployment?&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2022 05:55:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-06-13T05:55:28Z</dc:date>
    <item>
      <title>PowerBI Client issue ("element as type incompatible with the array") after SharePoint 13-&gt;16 upgrade</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Client-issue-quot-element-as-type-incompatible-with-the/m-p/2566440#M36582</link>
      <description>&lt;P&gt;I'm getting error when trying to get PowerBI report:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using Microsoft.PowerBI.Api.V2;
using Microsoft.PowerBI.Api.V2.Models;

// ...

UserPasswordCredential userCredential = new UserPasswordCredential(Username, Password);
AuthenticationContext ctx = new AuthenticationContext(AuthorityUrl);
Task&amp;lt;AuthenticationResult&amp;gt; task = ctx.AcquireTokenAsync(ResourceUrl, ApplicationId, userCredential);
AuthenticationResult authResult = task.Result;


if (authResult != null)
{
	TokenCredentials credentials = new TokenCredentials(authResult.AccessToken, "Bearer");

	using (PowerBIClient powerBIClient = new PowerBIClient(new Uri(ApiUrl), credentials))
	{
		// ...
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;System.ArrayTypeMismatchException: Attempted to access an element as a type incompatible with the array.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;at System.Collections.Generic.List`1.Add(T item)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;at Microsoft.PowerBI.Api.V2.PowerBIClient.Initialize()&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;at Microsoft.PowerBI.Api.V2.PowerBIClient..ctor(Uri baseUri, ServiceClientCredentials credentials, DelegatingHandler[] handlers)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works on SharePoint 2013. After upgrade to SharePoint 2016 started getting this issue. Parameters to connect and get PowerBI report are the same in both cases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found one solution with trying different versions of Newtonsoft.Json library, but it didn't help&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 11:49:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Client-issue-quot-element-as-type-incompatible-with-the/m-p/2566440#M36582</guid>
      <dc:creator>bartp</dc:creator>
      <dc:date>2022-06-08T11:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBI Client issue ("element as type incompatible with the array") after SharePoint</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Client-issue-quot-element-as-type-incompatible-with-the/m-p/2573895#M36652</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/398808"&gt;@bartp&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What kind of embedding method are you choosing to use in Sharepoint 2016, publish to web?&lt;/P&gt;
&lt;P&gt;As far as I know, the classic SharePoint Server is not supported with embedding to SharePoint Online.&lt;/P&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-embed-report-spo" target="_self"&gt;Known issues and limitations&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;According to your screenshot, I think there should be something wrong in a&lt;SPAN&gt;uthentication. I think you can try to delete the cache , then get the embed code and bear token and try again.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is a solved post with similar problem like yours, I hope it could help you solve your problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For reference:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Power-Query/Embed-Power-BI-report-on-SharePoint-on-prem-page-SP-List-as-data/td-p/497763" target="_self"&gt;Embed Power BI report on SharePoint on-prem page, SP List as data source &amp;amp;amp; repeatable deployment?&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 05:55:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Client-issue-quot-element-as-type-incompatible-with-the/m-p/2573895#M36652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-13T05:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: PowerBI Client issue ("element as type incompatible with the array") after SharePoint</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Client-issue-quot-element-as-type-incompatible-with-the/m-p/2575473#M36662</link>
      <description>&lt;P&gt;I have found that:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;On machine where it works with SharePoint 2013 - it works only if opened from different machine. When opened on the same server where it is deployed, it is the same issue.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 14:23:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerBI-Client-issue-quot-element-as-type-incompatible-with-the/m-p/2575473#M36662</guid>
      <dc:creator>bartp</dc:creator>
      <dc:date>2022-06-13T14:23:58Z</dc:date>
    </item>
  </channel>
</rss>

