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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

REST API Add Group User PowerBIEntityNotFound

Hi there! 

 

I am currently working with Add Group User from PBI REST API and found an issue when calling the API by iterating a list of workspaces in:

 

POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/users

 

Somehow, it runs properly with certain Workspaces, but it fails with others and showing below error. Failing workspaces has similar properties than the others than run Ok.

 

Failure happened on 'Source' side. ErrorCode=RestSourceCallFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The HttpStatusCode 404 indicates failure. Request URL: https://api.powerbi.com/v1.0/myorg/groups/XXXXXXX/users Response payload:{"error":{"code":"PowerBIEntityNotFound","pbi.error":{"code":"PowerBIEntityNotFound","parameters":{},"details":[],"exceptionCulprit":1}}},Source=Microsoft.DataTransfer.ClientLibrary,'

 

Any idea why this is happening?

 

Thanks!!

1 ACCEPTED SOLUTION

Well if you have configured the Service Principal as admin. Like this:

https://docs.microsoft.com/en-us/power-bi/admin/read-only-apis-service-principal-authentication

Then you can just use the Admin Requests of the API instead of that one from group. That will let you use any workspaces without added the Service Principal as Admin in the workspace.

I hope that helps


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

Happy to help!

LaDataWeb Blog

View solution in original post

4 REPLIES 4
ibarrau
Super User
Super User

Hi. Just to be sure. Is the account you are using to authenticate added as Admin in all of the workspaces? that request will only work for the workspaces that the connected user is admin.

If you have an admin account and you don't want to be added in all of the workspaces you can use the admin section request for that. It should be this one: https://docs.microsoft.com/en-us/rest/api/power-bi/admin/groups-add-user-as-admin

I hope that helps,


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

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

Hi @ibarrau

 

Thanks for the response. Regarding your question, I am trying to add a Service Principal to all workspaces and this is already authenticated as PBI admin. Hope this helps.

Well if you have configured the Service Principal as admin. Like this:

https://docs.microsoft.com/en-us/power-bi/admin/read-only-apis-service-principal-authentication

Then you can just use the Admin Requests of the API instead of that one from group. That will let you use any workspaces without added the Service Principal as Admin in the workspace.

I hope that helps


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

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

Hi Ibarrau,

 

I saw your reply here on this forum and tried it however there is still error on my end.

Since this is not my post I created a new thread: 

https://community.powerbi.com/t5/Service/ADF-to-Power-BI/m-p/2267026#M148454

 

Hope you can help me on my issue.

Thanks a lot!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.