Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Failed to execute Power BI cmdlet and REST API command with powershell

I succeded to connect in Powershell with to Power BI with service principal(Activated in Power Bi Admin Portal)
But when I tried to run command Get-PowerBIWorkspace i got the bellow unauthorized errorInkederror2_LI.jpg

And when i try to run Rest API request i got this error bellow
error3.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

Have you confirmed the prerequisite operations and checked the consider limitation before using PowerShell with the service principal? If not, you can take a look at the following link first:

Embed Power BI content in an embedded analytics application with service principal and an application secret - Power BI | Microsoft Docs

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous,

Have you confirmed the prerequisite operations and checked the consider limitation before using PowerShell with the service principal? If not, you can take a look at the following link first:

Embed Power BI content in an embedded analytics application with service principal and an application secret - Power BI | Microsoft Docs

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.