<?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: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/2761778#M38592</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;It's Impossible to add manually&amp;nbsp; a AAD SP&amp;nbsp; &amp;nbsp; to a gateway&amp;nbsp; &amp;nbsp;(As admin for example)&lt;/P&gt;&lt;P&gt;But it can be done via Powershell&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blog.jpries.com/2021/11/25/adding-a-non-email-enabled-object-to-power-bi-gateway-cluster-users/" target="_blank"&gt;https://blog.jpries.com/2021/11/25/adding-a-non-email-enabled-object-to-power-bi-gateway-cluster-users/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Sep 2022 11:51:27 GMT</pubDate>
    <dc:creator>Christophe93</dc:creator>
    <dc:date>2022-09-12T11:51:27Z</dc:date>
    <item>
      <title>How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/1859832#M29562</link>
      <description>&lt;P&gt;I need to get a list of all the Gateway clusters that is available in power bi portal. I went through the Rest Apis documentation(&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/getgateway" target="_blank"&gt;https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/getgateway&lt;/A&gt;) and found that this API requires gateway admin permissions. I am using a Service Principal and have the permissions scope&amp;nbsp;&lt;STRONG&gt;Gateway.ReadWrite.All&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;DataSet.ReadWrite.All &lt;/STRONG&gt;set.&amp;nbsp;&lt;BR /&gt;From the Power Bi portal, it is not possible to add a Service Principal as a gateway admin. I tried the following steps and not able to succeed:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Tried to add a &lt;STRONG&gt;service principal as an admin to the Gateway from the UI&lt;/STRONG&gt; using the service principal name and object id, but it is not allowing and throwing error:&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;These email addresses are invalid or duplicate: Service Principal Name&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;Specify at least one email address&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;Tried to &lt;STRONG&gt;create an AD group and added the Service Principal to that group and tried to add this group as an admin from the UI&lt;/STRONG&gt;, but it is also not allowing and throwing the same error:&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;Specify at least one email address&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;On further analysis, found the powershell cmdlet &lt;STRONG&gt;DataGateway. &lt;/STRONG&gt;Using this cmdlet, I am able to create a new gateway cluster with Service Principal as an admin and this gateway cluster is getting listed in the Get Gateways api.&lt;/P&gt;&lt;P&gt;But, I am not able to add the Service Principal as an admin to existing gateways using this powershell cmdlets also.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is this the only possible solution to add a Service Principal as an admin to a Gateway Cluster ?&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Is there any option to add Service Principal as an admin user to an existing Gateway Cluster using this powershell script ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Do we have any API to add the Service Principal as an admin to the existing Gateway Cluster ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 09:10:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/1859832#M29562</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-24T09:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/1863630#M29601</link>
      <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Within the Power BI Admin portal, we need to ensure that our&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Tenant settings&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;allow service principals to use Power BI APIs. In addition, you can restrict access to the APIs through security groups.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more details,please refer to:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.serverlessnotes.com/docs/list-gateways-power-bi-rest-api" target="_self"&gt;https://www.serverlessnotes.com/docs/list-gateways-power-bi-rest-api&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Liang &lt;BR /&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 02:31:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/1863630#M29601</guid>
      <dc:creator>V-lianl-msft</dc:creator>
      <dc:date>2021-05-26T02:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/1896391#M29930</link>
      <description>&lt;P&gt;Thanks for the reponse. The tenant level developer settings for using SPN are already given and as I mentioned in the above description, I was able to list the gateways that are created using the Powershell cmdlet. My concern is regarding adding the SPN as an admin to the the gateways that exists already.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 16:05:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/1896391#M29930</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-11T16:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/2146415#M32493</link>
      <description>&lt;P&gt;Hi &lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/303656" target="_blank"&gt;@sreejiths&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I hope this topic is not stale for you.*&lt;/P&gt;&lt;P&gt;1- As advised in the documentation, add your Service Principal to a Security Group&lt;/P&gt;&lt;P&gt;2- Then go to the Power Platform Admin Portal &amp;gt; Data section and add this Security Group to your Gateway's Admins&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your Service Principal will then have access to the gateway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Franck&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 18:13:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/2146415#M32493</guid>
      <dc:creator>axires</dc:creator>
      <dc:date>2021-10-20T18:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/2414530#M35136</link>
      <description>&lt;P&gt;did you manage to find a solution to adding a Service principal to an existing gateway on PBI?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 09:15:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/2414530#M35136</guid>
      <dc:creator>chriswhite1</dc:creator>
      <dc:date>2022-03-24T09:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/2530417#M36235</link>
      <description>&lt;P&gt;I am also having this problem, my SP is in a security group ,I have added the security group as admin on all the gateways, I have this security group allowed to use all the APIs in Power BI tenant settings.&lt;BR /&gt;&lt;BR /&gt;Still, the SP call to&amp;nbsp;api.powerbi.com/v1.0/myorg/gateways returns an empty list.&lt;BR /&gt;&lt;BR /&gt;The SP is able to call all other API endpoints I have tried without a problem.&lt;/P&gt;</description>
      <pubDate>Sat, 21 May 2022 00:41:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/2530417#M36235</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-21T00:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/2761778#M38592</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;It's Impossible to add manually&amp;nbsp; a AAD SP&amp;nbsp; &amp;nbsp; to a gateway&amp;nbsp; &amp;nbsp;(As admin for example)&lt;/P&gt;&lt;P&gt;But it can be done via Powershell&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blog.jpries.com/2021/11/25/adding-a-non-email-enabled-object-to-power-bi-gateway-cluster-users/" target="_blank"&gt;https://blog.jpries.com/2021/11/25/adding-a-non-email-enabled-object-to-power-bi-gateway-cluster-users/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 11:51:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/2761778#M38592</guid>
      <dc:creator>Christophe93</dc:creator>
      <dc:date>2022-09-12T11:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/3040642#M40881</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;I am having the same issue. Is this something you where able to resolve?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 14:59:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/3040642#M40881</guid>
      <dc:creator>kpia</dc:creator>
      <dc:date>2023-01-24T14:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/3048260#M40948</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;On my opinion , for&amp;nbsp; aleady&amp;nbsp; existing&amp;nbsp; on prem. gataways ,&amp;nbsp; ADD&amp;nbsp; the Service principal&amp;nbsp; as gateway Admin&amp;nbsp;&lt;BR /&gt;&amp;lt;-- run via&amp;nbsp; powershell&amp;nbsp; only&lt;BR /&gt;&lt;A href="https://blog.jpries.com/2021/11/25/adding-a-non-email-enabled-object-to-power-bi-gateway-cluster-users/" target="_blank" rel="noopener"&gt;https://blog.jpries.com/2021/11/25/adding-a-non-email-enabled-object-to-power-bi-gateway-cluster-users/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;No&amp;nbsp; chance for me&amp;nbsp; via&amp;nbsp; anothers methods ... but I get your opinions&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;On python call&amp;nbsp; &amp;nbsp;gateways&amp;nbsp; inventory API&amp;nbsp; via this SP connection&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2023 09:38:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/3048260#M40948</guid>
      <dc:creator>Christophe93</dc:creator>
      <dc:date>2023-01-28T09:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/3122140#M41656</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/395600"&gt;@kpia&lt;/a&gt;&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you manage to find a solution to this?&amp;nbsp; I am having the exact same issue, can't get Gateways as the Service Principal.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 17:15:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/3122140#M41656</guid>
      <dc:creator>James4336</dc:creator>
      <dc:date>2023-03-09T17:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/3122159#M41657</link>
      <description>&lt;P&gt;The unique solution : via powershell&amp;nbsp; &amp;amp; api run&lt;/P&gt;&lt;P&gt;It's Impossible to add manually&amp;nbsp; a AAD Service Principal to a gateway&amp;nbsp; &amp;nbsp;(As admin for example , to be used on python &amp;amp; pbi gateway apis)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;But it can be done via Powershell&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blog.jpries.com/2021/11/25/adding-a-non-email-enabled-object-to-power-bi-gateway-cluster-users/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://blog.jpries.com/2021/11/25/adding-a-non-email-enabled-object-to-power-bi-gateway-cluster-use...&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 17:26:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/3122159#M41657</guid>
      <dc:creator>Christophe93</dc:creator>
      <dc:date>2023-03-09T17:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/3122165#M41659</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/395600" target="_blank" rel="noopener"&gt;@kpia&lt;/A&gt;&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/83605" target="_blank" rel="noopener"&gt;@duncanmi&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've just made it work!!&amp;nbsp; I removed the Service Principal Security Group from the Gateway and re-added it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only difference this time was I added it as an Admin at the first instance, my previous attempt I initially added the Security Group as a Content Creator then later switched it to Admin.&amp;nbsp; Might help someone.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 17:29:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/3122165#M41659</guid>
      <dc:creator>James4336</dc:creator>
      <dc:date>2023-03-09T17:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a Service Principal as a Gateway Admin inorder to get a list of gateways using API ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/4366521#M59078</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;thanks for your asnwer. There is no way to add service principal as admin from Power Platform without using powershell:&lt;BR /&gt;&lt;BR /&gt;As admin I do not have that option:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jaryszek_0-1737008490572.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1226851i51740F9E6707E6A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jaryszek_0-1737008490572.png" alt="jaryszek_0-1737008490572.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Only powershell is existing solution, docs:&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/power-platform/admin/powershell-create-service-principal" target="_blank" rel="noopener"&gt;Creating a service principal application using PowerShell - Power Platform | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;A lot is helping also Guy in the Cube to understand all restriction from Microsoft:&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=lfP6ygindSU&amp;amp;list=PLpBU4EcPajILyeFik6p9EedYoUH4kh12m&amp;amp;index=7" target="_self"&gt;https://www.youtube.com/watch?v=lfP6ygindSU&amp;amp;list=PLpBU4EcPajILyeFik6p9EedYoUH4kh12m&amp;amp;index=7&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Jacek&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 06:23:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-add-a-Service-Principal-as-a-Gateway-Admin-inorder-to-get/m-p/4366521#M59078</guid>
      <dc:creator>jaryszek</dc:creator>
      <dc:date>2025-01-16T06:23:00Z</dc:date>
    </item>
  </channel>
</rss>

