<?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: Unable to add groups to a workspace using Rest API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-add-groups-to-a-workspace-using-Rest-API/m-p/2850400#M39325</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;With PowerShell, you can add an AD group to Power BI Workspace using the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/groups/addgroupuser#principaltype" target="_blank" rel="nofollow noopener noreferrer"&gt;Groups – Add Group User&lt;/A&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;API or&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;A href="https://docs.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.workspaces/add-powerbiworkspaceuser?view=powerbi-ps" target="_blank" rel="nofollow noopener noreferrer"&gt;Add-PowerBIWorkspaceUser&lt;/A&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Cmdlet.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;What you will need:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Object ID for the group
&lt;UL&gt;
&lt;LI&gt;From Azure Active Directory -&amp;gt; Select Groups -&amp;gt; Select the required Group -&amp;gt; Copy the Object ID&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Access right to the Workspace for the group
&lt;UL&gt;
&lt;LI&gt;Level of Access you want to grant to the Workspace (&lt;BR /&gt;Member, Admin, Contributor, Viewer )&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;The PrincipalType
&lt;UL&gt;
&lt;LI&gt;The type of Principal you want to add (&lt;BR /&gt;App, Group, User ) For this example, we want to add an AD Security Group, so we will use Group&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;The Workspace ID
&lt;UL&gt;
&lt;LI&gt;From Power BI Service -&amp;gt; Select the Workspace -&amp;gt; copy the ID next to Group in the URL.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For more details, please refer to:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://rukiatu.com/adding-ad-security-group-to-power-bi-workspace-using-powershell/" target="_blank" rel="nofollow noopener noreferrer"&gt;ADDING AZURE AD SECURITY GROUP TO POWER BI WORKSPACE USING POWERSHELL - Ruki&amp;amp;#039;s Blog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Power-BI-Group-management-using-Active-Directory-roles-and/ba-p/308092" target="_self"&gt;Power BI Group management using Active Directory roles and PowerShell&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jianbo Li&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Oct 2022 06:05:15 GMT</pubDate>
    <dc:creator>v-jianboli-msft</dc:creator>
    <dc:date>2022-10-19T06:05:15Z</dc:date>
    <item>
      <title>Unable to add groups to a workspace using Rest API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-add-groups-to-a-workspace-using-Rest-API/m-p/2842955#M39266</link>
      <description>&lt;P&gt;l need to use powershell to add a group to an existing workspace&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Invoke-RestMethod -Method POST -Uri "&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;&amp;lt;groupId&amp;gt;/users" -Header @{Authorization = 'Bearer $token'; 'Content-type' = 'application/json'; 'User-Agent' = 'Jenkins'} -Body '{"principalType" = "Group", "groupUserAccessRight"= "Admin", "identifier"= "ID", "displayName"="MyGroupName"}'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I keep getting (400) Bad Request error. I am able to add individual users with this body:&lt;/P&gt;&lt;P&gt;{"groupUserAccessRight"= "Admin", "&lt;SPAN&gt;emailAddress&lt;/SPAN&gt;"= "john@microsoft.com"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong to add groups?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: The problem seem to be the identifier number I am using. I am not sure how to retrieve the proper one though&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 19:17:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-add-groups-to-a-workspace-using-Rest-API/m-p/2842955#M39266</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-14T19:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to add groups to a workspace using Rest API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-add-groups-to-a-workspace-using-Rest-API/m-p/2845026#M39274</link>
      <description>&lt;P&gt;The groups need to be mail enabled AD groups.&amp;nbsp; The ID is&amp;nbsp; the AD GUID of the group.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2022 19:59:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-add-groups-to-a-workspace-using-Rest-API/m-p/2845026#M39274</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-10-16T19:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to add groups to a workspace using Rest API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unable-to-add-groups-to-a-workspace-using-Rest-API/m-p/2850400#M39325</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;With PowerShell, you can add an AD group to Power BI Workspace using the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/groups/addgroupuser#principaltype" target="_blank" rel="nofollow noopener noreferrer"&gt;Groups – Add Group User&lt;/A&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;API or&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;A href="https://docs.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.workspaces/add-powerbiworkspaceuser?view=powerbi-ps" target="_blank" rel="nofollow noopener noreferrer"&gt;Add-PowerBIWorkspaceUser&lt;/A&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Cmdlet.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;What you will need:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Object ID for the group
&lt;UL&gt;
&lt;LI&gt;From Azure Active Directory -&amp;gt; Select Groups -&amp;gt; Select the required Group -&amp;gt; Copy the Object ID&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Access right to the Workspace for the group
&lt;UL&gt;
&lt;LI&gt;Level of Access you want to grant to the Workspace (&lt;BR /&gt;Member, Admin, Contributor, Viewer )&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;The PrincipalType
&lt;UL&gt;
&lt;LI&gt;The type of Principal you want to add (&lt;BR /&gt;App, Group, User ) For this example, we want to add an AD Security Group, so we will use Group&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;The Workspace ID
&lt;UL&gt;
&lt;LI&gt;From Power BI Service -&amp;gt; Select the Workspace -&amp;gt; copy the ID next to Group in the URL.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For more details, please refer to:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://rukiatu.com/adding-ad-security-group-to-power-bi-workspace-using-powershell/" target="_blank" rel="nofollow noopener noreferrer"&gt;ADDING AZURE AD SECURITY GROUP TO POWER BI WORKSPACE USING POWERSHELL - Ruki&amp;amp;#039;s Blog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Power-BI-Group-management-using-Active-Directory-roles-and/ba-p/308092" target="_self"&gt;Power BI Group management using Active Directory roles and PowerShell&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jianbo Li&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 06:05:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unable-to-add-groups-to-a-workspace-using-Rest-API/m-p/2850400#M39325</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2022-10-19T06:05:15Z</dc:date>
    </item>
  </channel>
</rss>

