<?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 Cannot create workspace via Power Pi Api http 500 in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-workspace-via-Power-Pi-Api-http-500/m-p/752446#M20155</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the Power Bi Api to try and create a new workspace v2 (&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/groups/creategroup#example-creating-a-workspace-v2" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/rest/api/power-bi/groups/creategroup#example-creating-a-workspace-v2&lt;/A&gt;). But when i try and do this i get an error http 500.&lt;/P&gt;&lt;P&gt;What i am doing is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do a http post call to&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups?workspaceV2=true" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups?workspaceV2=true&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp; with in de body of the call this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "name": "test"
}&lt;/PRE&gt;&lt;P&gt;but it always returns a http 500 error code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with this as result&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;48
{
  "error":{
    "code":"","message":"An error has occurred."
  }
}
0&lt;/PRE&gt;&lt;P&gt;The app registration that i use to make the call has all the permissions needed to create a workspace. And the app registration also seems to work because other calls do work correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong with the call and how can i debug this issue ?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2019 09:01:02 GMT</pubDate>
    <dc:creator>WimEling</dc:creator>
    <dc:date>2019-07-30T09:01:02Z</dc:date>
    <item>
      <title>Cannot create workspace via Power Pi Api http 500</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-workspace-via-Power-Pi-Api-http-500/m-p/752446#M20155</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the Power Bi Api to try and create a new workspace v2 (&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/groups/creategroup#example-creating-a-workspace-v2" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/rest/api/power-bi/groups/creategroup#example-creating-a-workspace-v2&lt;/A&gt;). But when i try and do this i get an error http 500.&lt;/P&gt;&lt;P&gt;What i am doing is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do a http post call to&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://api.powerbi.com/v1.0/myorg/groups?workspaceV2=true" target="_blank" rel="noopener"&gt;https://api.powerbi.com/v1.0/myorg/groups?workspaceV2=true&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp; with in de body of the call this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "name": "test"
}&lt;/PRE&gt;&lt;P&gt;but it always returns a http 500 error code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with this as result&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;48
{
  "error":{
    "code":"","message":"An error has occurred."
  }
}
0&lt;/PRE&gt;&lt;P&gt;The app registration that i use to make the call has all the permissions needed to create a workspace. And the app registration also seems to work because other calls do work correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong with the call and how can i debug this issue ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 09:01:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-workspace-via-Power-Pi-Api-http-500/m-p/752446#M20155</guid>
      <dc:creator>WimEling</dc:creator>
      <dc:date>2019-07-30T09:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create workspace via Power Pi Api http 500</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-workspace-via-Power-Pi-Api-http-500/m-p/753947#M20171</link>
      <description>&lt;P&gt;Maybe I should at the fact that i am using the Service Principal way to connect to the api. So i created and App Registration in Azure with the appropriate permissions. And I added the Service Principal account to the group of users that can use the Power Bi Api. And all other calls are being handled correctly so for example i have created a Workspace by hand and when I import the pbix via the api and set paramaters etc. This all works like a charm. Only creating workspaces via the Api is not working. Has anybody any information of what i am missing here ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 12:25:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-workspace-via-Power-Pi-Api-http-500/m-p/753947#M20171</guid>
      <dc:creator>WimEling</dc:creator>
      <dc:date>2019-07-31T12:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create workspace via Power Pi Api http 500</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-workspace-via-Power-Pi-Api-http-500/m-p/1846269#M29447</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="157638" data-lia-user-login="WimEling" class="lia-mention lia-mention-user"&gt;WimEling&lt;/a&gt;&amp;nbsp;I am also getting the same issue. Did you find the solution?&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 12:39:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-workspace-via-Power-Pi-Api-http-500/m-p/1846269#M29447</guid>
      <dc:creator>narayanadvl</dc:creator>
      <dc:date>2021-05-17T12:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create workspace via Power Pi Api http 500</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-workspace-via-Power-Pi-Api-http-500/m-p/1847342#M29462</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="302395" data-lia-user-login="narayanadvl" class="lia-mention lia-mention-user"&gt;narayanadvl&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I would use the PowerBIClient to make the API call a little easier. The PowerBIClient is in the&amp;nbsp;Microsoft.PowerBI.Api namespace. The following code works for me as long as you have a valid PowerBIClient.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 21:10:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Cannot-create-workspace-via-Power-Pi-Api-http-500/m-p/1847342#M29462</guid>
      <dc:creator>CVance</dc:creator>
      <dc:date>2021-05-17T21:10:48Z</dc:date>
    </item>
  </channel>
</rss>

