Reply
Amar_vm
New Member

Encountering 401/403 errors while using the Power BI REST API with PowerShell and Power Automate

image.png

 

Used the HTTP action to invoke an Power BI Rest API for updating parameters of a particular dataset in a workspace but keep getting the 401/403 error codes while trying to run the flow. Tried do this same action in Power Shell as well using Power BI cmdlet but getting the same error codes, any help on how to tackle these errors or any better way to automatically update parameters in a Power BI report are helpful. Thank you.

7 REPLIES 7
lbendlin
Super User
Super User

avatar user
Anonymous
Not applicable

Hi  @Amar_vm ,

 

This is a Power BI Rest API issue, not a Mobile App issue, next time if you encounter such a problem, please feel free to ask in the Developer forum, thank you!

If you post in the right forum, it will help you to get the solution quickly.

I have forwarded this post to Developer Forum, please know.

 

According to my research and understanding, 401/403 related error return codes are usually related to insufficient privileges or disabled admin settings, if it's convenient can you show how the AAD token is generated for you to run this rest API? If it is generated by AAD user, it should only need dataset owner permission, if it is called by a service principal profile, it may need more settings and permissions, you also need to open some admin settings, you can refer to this document

Embed Power BI content in an embedded analytics application with service principal and an applicatio...

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Amar_vm
New Member

How do we check and edit those permissions? Currently using an embeded app created in Azure AD for the API is there some other way?

you can check the token scope with jwt.io but I don't think that's the issue.

 

If you have a Pro license you can open a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi
Otherwise you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues .

lbendlin
Super User
Super User

Tried an example over there and the API call went through without error, but getting the 403 error in Power Automate. The user is the dataset owner in both the cases.

dataset owner may not be enough. That call may require workspace level permissions.

avatar user

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)