Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
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 Powershell script :
Login-PowerBIServiceAccount
$groups = Get-PowerBIGroup -Scope Organization -All
$groups
While running the script I am getting error below error:
Am I missing any other admin rights to extract the information of Power BI Service ?
Hi @Anonymous,
I think Watsky means the general organization and gov/national organization. The gov/national should be different from the common organization.
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?
Power BI REST APIs for embedded analytics and automation - Power BI REST API | Microsoft Docs
Microsoft identity platform scopes, permissions, & consent | Microsoft Docs
Regards,
Xiaoxin Sheng
Hi @Watsky ,
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" ?
Regards,
ankbaner
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:
Proud to be a Super User!
Hi @Watsky ,
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.
Hey @Anonymous ,
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:
Login-PowerBIServiceAccount -Environment USGov
Proud to be a Super User!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |