<?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: Getting error while adding AD Group as a Gateway - Datasource User using API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Getting-error-while-adding-AD-Group-as-a-Gateway-Datasource-User/m-p/1863818#M29603</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can only add 'Office 365 group‘ and 'Mail-Enabled Security group' to the datasource user, so what's your group type?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 May 2021 05:32:53 GMT</pubDate>
    <dc:creator>v-lionel-msft</dc:creator>
    <dc:date>2021-05-26T05:32:53Z</dc:date>
    <item>
      <title>Getting error while adding AD Group as a Gateway - Datasource User using API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-error-while-adding-AD-Group-as-a-Gateway-Datasource-User/m-p/1860123#M29563</link>
      <description>&lt;P&gt;I have created a Gateway cluster using the powershell cmdlet DataGateway and added the Service Principal as an admin of that gateway cluster.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Service Principal contains the &lt;STRONG&gt;Gateway.ReadWrite.All&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;DataSet.ReadWrite.All&lt;/STRONG&gt; permission scopes.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In the Api documentation(&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/adddatasourceuser" target="_blank"&gt;https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/adddatasourceuser&lt;/A&gt;) for Add Gateway DataSource User, the request body contains the following parameters:&lt;BR /&gt;&lt;STRONG&gt;datasourceAccessRight&lt;BR /&gt;displayName&lt;BR /&gt;emailAddress&lt;BR /&gt;identifier&lt;BR /&gt;principalType&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the Datasource is created using API, the Service Principal already exists as a Datasource User.&lt;/P&gt;&lt;P&gt;I am able to add a normal user also by passing the request as:&lt;BR /&gt;&lt;STRONG&gt;{ &lt;SPAN class="hljs-attr"&gt;"emailAddress"&lt;/SPAN&gt;: &lt;SPAN class="hljs-string"&gt;"john@contoso.com"&lt;/SPAN&gt;, &lt;SPAN class="hljs-attr"&gt;"datasourceAccessRight"&lt;/SPAN&gt;: &lt;SPAN class="hljs-string"&gt;"Read"&lt;/SPAN&gt; }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;using the API and Service Principal.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to add an AD group by following the sample provided in the documentation for service principal:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{ &lt;SPAN class="hljs-attr"&gt;"identifier"&lt;/SPAN&gt;: &lt;SPAN class="hljs-string"&gt;"3d9b93c6-7b6d-4801-a491-1738910904fd"&lt;/SPAN&gt;, &lt;SPAN class="hljs-attr"&gt;"datasourceAccessRight"&lt;/SPAN&gt;: &lt;SPAN class="hljs-string"&gt;"ReadOverrideEffectiveIdentity"&lt;/SPAN&gt; }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and made some changes to the request JSON by adding principalType as Group:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; "datasourceAccessRight": "Read",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; "identifier": "AD group id",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; "principalType": "Group"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am getting the below error:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;{"error":{"code":"DMTS_PrincipalsAreInvalidError","pbi.error":{"code":"DMTS_PrincipalsAreInvalidError","parameters":{},"details":[],"exceptionCulprit":1}}}&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Why is this error coming? In this documentation page, it is not mentioned about mailEnabled groups only. Also, the request json was created based on the example provided for Service Principal.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Is there any solution to add an AD group as a Gateway - Datasource User ?&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 11:11:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-error-while-adding-AD-Group-as-a-Gateway-Datasource-User/m-p/1860123#M29563</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-24T11:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while adding AD Group as a Gateway - Datasource User using API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-error-while-adding-AD-Group-as-a-Gateway-Datasource-User/m-p/1863818#M29603</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can only add 'Office 365 group‘ and 'Mail-Enabled Security group' to the datasource user, so what's your group type?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 05:32:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-error-while-adding-AD-Group-as-a-Gateway-Datasource-User/m-p/1863818#M29603</guid>
      <dc:creator>v-lionel-msft</dc:creator>
      <dc:date>2021-05-26T05:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error while adding AD Group as a Gateway - Datasource User using API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-error-while-adding-AD-Group-as-a-Gateway-Datasource-User/m-p/1896380#M29929</link>
      <description>&lt;P&gt;Thanks for the response.&lt;BR /&gt;The group type is &lt;STRONG&gt;Security group&lt;/STRONG&gt;. Since the sample demonstrates adding a SPN as a Datasource user, I think we should be able to add a security group as well.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 15:58:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-error-while-adding-AD-Group-as-a-Gateway-Datasource-User/m-p/1896380#M29929</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-11T15:58:15Z</dc:date>
    </item>
  </channel>
</rss>

