HTTP request details for getting the groups and users assigned to each of the group

Platform: UiPath Automation Suite

I am explaining the manual steps first. Login to Orchestrator as admin → Admin → Accounts and Groups → Groups

Once we reach this page - we can see the list of groups created in orchestrator and the users assigned to each of these groups.

Kindly note that this is not at the tenant level. It is at the admin level

My requirement is to get these groups and associated users using API / HTTP request.

Note that i have created external application with required access for this and i am aware about generating the token as well. Kindly help me with the end point and header details for getting these details via API call

@sharazkm32

I believe this is what you are looking for. It has end point and sample as well

cheers

1 Like

Thank You Anil for your help. I will check and update you soon

Regarding the organization id - Kindly share the API link to get the organization level details as I don’t see any direct option in the shared link

@sharazkm32

Org id generally comes from api access page…

or when you login in redirectly in url you would see it

cheers

To conclude this discussion - I am sharing the solution which i found with the help of above comments. Thank You @Anil

First step is to create an external app from the admin screen and get the client_id and client secret.

Next step is to get Bearer Token. Use end point as below
orchesetratorURL+“/identity_/connect/token”

Add following parameters
grant_type as “client_credentials”
client_id from above step
client_secret from above step
scope from above step

Method as POST and accepted response as JSON. Deserialize and get the token ready

Third step is to get all the groups available
For this - we need to find the partitionGlobalId specific to organization level. To get partitionGlobalId - follow below steps

  1. Get partitionGlobalId. You can get this value by signing in to the tenant, opening developer tools, then extracting the value from there, see screenshot below. You can create a small automation to do that, but I’m still checking with product if there is an API that we can call to get this value, will get back to you on that one. This value should not change anyway for any given organization, so you can get it once and save it as a fixed value in a variable and use it in your app or automation.

For getting all the groups -

use end point as https://uipath.xxxx.com/Identity_/api/Group/12fa80b0-6045-471e-8861-60559d2d77f6

where the last part is partitionGlobalId

Pass Authorization as one of the header. Bearer BearerToken

For getting users in each of the groups

Deserialize and start looping through each of the groups. Get the id of the group and use below end point. Headers will remain same as Authorization

https://uipath.xxxx.com/portal_/api/identity/Group/12fa80b0-6045-471e-8861-60559d2d77f6/593263e9-f720-4650-93aa-2d271f712585

Last portion is group id
second last is globalpartitionid

I hope this will help someone in future

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.