<?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 forbidden error when trying to create a workspace using the dotnet core SDK in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-create-a-workspace-using/m-p/4056868#M54308</link>
    <description>&lt;P&gt;I found that my administrator has restricted access.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2024 15:25:43 GMT</pubDate>
    <dc:creator>aaronfdsouza</dc:creator>
    <dc:date>2024-07-23T15:25:43Z</dc:date>
    <item>
      <title>Getting forbidden error when trying to create a workspace using the dotnet core SDK</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-create-a-workspace-using/m-p/4054760#M54285</link>
      <description>&lt;P&gt;I am using the dotnet core SDK with a service principal and I need to create a workspace.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var credentials = await Token.GetTokenCredentials(clientId, clientSecret, tenantId);
using (PowerBIClient client = new PowerBIClient(credentials))
{
  GroupCreationRequest request = new GroupCreationRequest
  {
    Name = "MyNewWorkspace"
  };
  await client.Groups.CreateGroupAsync(request);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The service principal corresponding to the client has the following API permissions&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Capacity.Read.All&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Capacity.ReadWrite.All&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Workspace.Read.All&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;Workspace.ReadWrite.All&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN&gt;Is there some admin level setting that I need to be aware of? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 22 Jul 2024 23:03:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-create-a-workspace-using/m-p/4054760#M54285</guid>
      <dc:creator>aaronfdsouza</dc:creator>
      <dc:date>2024-07-22T23:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Getting forbidden error when trying to create a workspace using the dotnet core SDK</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-create-a-workspace-using/m-p/4055537#M54290</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/765913"&gt;@aaronfdsouza&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I know,&amp;nbsp;&lt;SPAN&gt;we can use API call by a service principal profile to create a new workspace in Power BI Service.&amp;nbsp;For more information see:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-multi-tenancy" data-linktype="absolute-path" target="_blank"&gt;Service principal profiles in Power BI Embedded&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more details about this REST API.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/groups/create-group" target="_blank"&gt;Groups - Create Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn&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, 23 Jul 2024 06:13:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-create-a-workspace-using/m-p/4055537#M54290</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-23T06:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Getting forbidden error when trying to create a workspace using the dotnet core SDK</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-create-a-workspace-using/m-p/4056868#M54308</link>
      <description>&lt;P&gt;I found that my administrator has restricted access.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 15:25:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-create-a-workspace-using/m-p/4056868#M54308</guid>
      <dc:creator>aaronfdsouza</dc:creator>
      <dc:date>2024-07-23T15:25:43Z</dc:date>
    </item>
  </channel>
</rss>

