<?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 Powershell script error - Unauthorized in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2259678#M33656</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have Power BI administrator role in my organization. I want to view how many workspaces have been created, therefore I was running the simple below &amp;nbsp;Powershell script :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="1 2 3 4 5 6 7" color="#3366FF"&gt;&lt;EM&gt;Login-PowerBIServiceAccount&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="1 2 3 4 5 6 7" color="#3366FF"&gt;&lt;EM&gt;$groups&amp;nbsp; =&amp;nbsp; Get-PowerBIGroup -Scope Organization -All&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="1 2 3 4 5 6 7" color="#3366FF"&gt;&lt;EM&gt;$groups&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;While running the script I am getting error below error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Workspace_Error.PNG" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/649406i50D84979220B5727/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Workspace_Error.PNG" alt="Workspace_Error.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Am I missing any other admin rights to extract the information of Power BI Service ?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Dec 2021 13:33:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-12-29T13:33:54Z</dc:date>
    <item>
      <title>Powershell script error - Unauthorized</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2259678#M33656</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have Power BI administrator role in my organization. I want to view how many workspaces have been created, therefore I was running the simple below &amp;nbsp;Powershell script :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="1 2 3 4 5 6 7" color="#3366FF"&gt;&lt;EM&gt;Login-PowerBIServiceAccount&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="1 2 3 4 5 6 7" color="#3366FF"&gt;&lt;EM&gt;$groups&amp;nbsp; =&amp;nbsp; Get-PowerBIGroup -Scope Organization -All&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="1 2 3 4 5 6 7" color="#3366FF"&gt;&lt;EM&gt;$groups&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;While running the script I am getting error below error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Workspace_Error.PNG" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/649406i50D84979220B5727/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Workspace_Error.PNG" alt="Workspace_Error.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Am I missing any other admin rights to extract the information of Power BI Service ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 13:33:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2259678#M33656</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-29T13:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script error - Unauthorized</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2260440#M33661</link>
      <description>&lt;P&gt;Hey&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;One (1) thought, do you work in the regular commerical environment? If your tenant is not in the regular commerical Power BI environment then you would need to set your environment. For instance, I work in GCC so I have to set my environment as such:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Login-PowerBIServiceAccount -Environment USGov&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 02:36:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2260440#M33661</guid>
      <dc:creator>Watsky</dc:creator>
      <dc:date>2021-12-30T02:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script error - Unauthorized</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2261176#M33673</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/143949"&gt;@Watsky&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the reply. Can you explain what is "regular commercial environment" ? And how do I know what are options we have for -Environment similar to "USGov" ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ankbaner&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 13:22:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2261176#M33673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-30T13:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script error - Unauthorized</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2261206#M33674</link>
      <description>&lt;P&gt;When you log into the Power BI service what is the url that you're connecting to? Is it app.powerbi.com or is it something else? These are the options as show via Power Shell:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Watsky_0-1640872560428.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/649795iF4CFA47D8DF7B076/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Watsky_0-1640872560428.png" alt="Watsky_0-1640872560428.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 13:56:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2261206#M33674</guid>
      <dc:creator>Watsky</dc:creator>
      <dc:date>2021-12-30T13:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script error - Unauthorized</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2262685#M33698</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/143949"&gt;@Watsky&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I am connecting to app.powerbi.com from Finland. I tried 3 options from "-Environment" i.e. Custom, Germany and Public but neither of the options worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Jan 2022 09:36:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2262685#M33698</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-02T09:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell script error - Unauthorized</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2264573#M33722</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;I think&amp;nbsp;Watsky&amp;nbsp;means the general organization and gov/national organization. The gov/national should be different from the common organization.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;In addition, the rest API is required to enable the permissions. Have you checked the account include the corresponding permissions and scopes that API required?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank"&gt;Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Docs&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent" target="_blank"&gt;Microsoft identity platform scopes, permissions, &amp;amp; consent | Microsoft Docs&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 01:57:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Powershell-script-error-Unauthorized/m-p/2264573#M33722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-04T01:57:58Z</dc:date>
    </item>
  </channel>
</rss>

