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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

"Groups UpdateGroupAsAdmin" API throws 401 Unauthorized error

I'm using https://learn.microsoft.com/en-us/rest/api/power-bi/admin/groups-update-group-as-admin API to update description of the workspace.

Workspace access is configured: service principle, which I use to authenticate API, is set as Admin for my workspace (also as described in this thread https://community.fabric.microsoft.com/t5/Developer/Unable-to-patch-reportgroup-name-with-a-service-...).

 

But when I run "Groups UpdateGroupAsAdmin" request either from my C# code or from Postman, I receive 401 Unauthorized error.

 

Are the needed some specific rights to be set for service principle to execute this PATCH query?

 

Thank you very much in advance.

2 REPLIES 2
Anonymous
Not applicable

Hi  @Anonymous ,

 

Please also check in the admin portal->tenant setting that the service principal setting related to rest API using is also enable for your service principal or for the whole organization.

vyangliumsft_0-1691053789586.png

And also make sure all the permissions related to workspace is added for the serivice principal stands for the AAD application

Grant tenant-wide admin consent to an application - Microsoft Entra | Microsoft Learn

 

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.

Anonymous
Not applicable

Thank you v-yangliu-msft for the answer.

Yes, of course I have enabled API usage for the service principle (otherwise I could not use API at all).

Regarding Admin consent - I believe that it is not needed while using service principles, is it? For example, if you check description of this API https://learn.microsoft.com/en-us/rest/api/power-bi/admin/groups-get-group-users-as-admin, then it is said that in case when service principle is used, there must be no admin consents granted. So I believe that this is the case also for this UpdateGroupAsAdmin.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors