<?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: Adding service principal directly to the workspace as an admin gives me an error in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2431513#M35283</link>
    <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp; I have checked, group (service princiapl which I wanted to add belongs to this group) are added below developers seetings. Sitll I am getting thsi error. Do you have any advise?&lt;/P&gt;</description>
    <pubDate>Fri, 01 Apr 2022 09:05:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-04-01T09:05:12Z</dc:date>
    <item>
      <title>Adding service principal directly to the workspace as an admin gives me an error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2417777#M35160</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to add Service Principal (app registration) to workspace users.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using AccessToken generated for PowerBI Service principals with granted permission:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gryczanu_0-1648207797716.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/689992i24F6602F5EC52D4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gryczanu_0-1648207797716.png" alt="gryczanu_0-1648207797716.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a PowerShell code which I use to add Service Princpal to worksapce users&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$Uri&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups/&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;$WorkspaceId&lt;/SPAN&gt;&lt;SPAN&gt;/users"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$Headers&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;@&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;Authorization&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"Bearer &lt;/SPAN&gt;&lt;SPAN&gt;$AccessToken&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;$Body&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;@&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;identifier&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;$AdObjectIdentifier&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;groupUserAccessRight&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;"Admin"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;principalType&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt; =&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;"App"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Invoke-RestMethod&lt;/SPAN&gt;&lt;SPAN&gt; -Uri &lt;/SPAN&gt;&lt;SPAN&gt;$Uri&lt;/SPAN&gt;&lt;SPAN&gt; -Headers &lt;/SPAN&gt;&lt;SPAN&gt;$Headers&lt;/SPAN&gt;&lt;SPAN&gt; -Method Post -ContentType &lt;/SPAN&gt;&lt;SPAN&gt;"application/json"&lt;/SPAN&gt;&lt;SPAN&gt; -Body (&lt;/SPAN&gt;&lt;SPAN&gt;ConvertTo-Json&lt;/SPAN&gt; &lt;SPAN&gt;$Body&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;$AdObjectIdentifier is an Azure ObejctId for App Registarion that I want to add to the worksapce users&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am geting&amp;nbsp; an error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The remote server returned an error: (403) Forbidden.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{"error":{"code":"InvalidRequest","message":"Failed to get service principal details from AAD."}}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can add AAD group to workspace (when&amp;nbsp;&lt;SPAN&gt;$AdObjectIdentifier = AAD Obejct ID), but not Service principal, why?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please, help me to understand this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Urszula&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 11:33:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2417777#M35160</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-25T11:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Adding service principal directly to the workspace as an admin gives me an error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2419257#M35168</link>
      <description>&lt;P&gt;Your tenant admin may need to allow Service Principals to be used in the tenant.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2022 15:08:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2419257#M35168</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-03-26T15:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding service principal directly to the workspace as an admin gives me an error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2421343#M35200</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;Could you please explain me this a bit more?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 11:22:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2421343#M35200</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-28T11:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Adding service principal directly to the workspace as an admin gives me an error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2421476#M35203</link>
      <description>&lt;P&gt;talk to your tenant admin about the settings on your tenant.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 12:17:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2421476#M35203</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-03-28T12:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding service principal directly to the workspace as an admin gives me an error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2423302#M35214</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;Note:&lt;/P&gt;
&lt;P&gt;Service principals have access to any tenant settings they're enabled for. Depending on your admin settings, this includes specific security groups or the entire organization.&lt;/P&gt;
&lt;P&gt;Please check whether you have added your Security Group which has added the service principal as a member into the tenant setting.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 861px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/691281i66D8982AE90D7109/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You may check the steps in the offical blog to learn more details.&lt;/P&gt;
&lt;P&gt;For referencce:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal" target="_self"&gt;Embed Power BI content with service principal and an application secret&lt;/A&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>Tue, 29 Mar 2022 06:50:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2423302#M35214</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-29T06:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Adding service principal directly to the workspace as an admin gives me an error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2431513#M35283</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp; I have checked, group (service princiapl which I wanted to add belongs to this group) are added below developers seetings. Sitll I am getting thsi error. Do you have any advise?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 09:05:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/2431513#M35283</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-01T09:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Adding service principal directly to the workspace as an admin gives me an error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/4104315#M54808</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Was this resolved? I am getting same error:&lt;/P&gt;&lt;P&gt;{"error": {&lt;BR /&gt;"code": "InvalidRequest",&lt;BR /&gt;"message": "Failed to get service principal details from AAD."&lt;BR /&gt;}}&lt;/P&gt;&lt;P&gt;when I try to use API:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;POST https://api.powerbi.com/v1.0/myorg/admin/groups/{groupId}/users&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I am authenticating using a service principal which is added to a security group and the group enabled in the PowerBI admin settings: Service Principals can use Fabric APIs.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 13:42:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/4104315#M54808</guid>
      <dc:creator>shanj</dc:creator>
      <dc:date>2024-08-16T13:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adding service principal directly to the workspace as an admin gives me an error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/4104320#M54809</link>
      <description>&lt;P&gt;Yours may be a different issue.&amp;nbsp;If you have a Pro license you can open a Pro ticket at &lt;A href="https://admin.powerplatform.microsoft.com/newsupportticket/powerbi" target="_blank"&gt;https://admin.powerplatform.microsoft.com/newsupportticket/powerbi&lt;/A&gt;&lt;BR /&gt;Otherwise you can raise an issue at &lt;A href="https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues&lt;/A&gt; .&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 13:48:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Adding-service-principal-directly-to-the-workspace-as-an-admin/m-p/4104320#M54809</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-16T13:48:01Z</dc:date>
    </item>
  </channel>
</rss>

