Update Group API call in Postman

I am having issues with using the Update Group API in Postman. provided Global partition ID , Group ID as parameter and group name , User Id (email id of the person) . Receiving 200 ok but as per the documentation it should be 201 ok when the user added successfully. Can someone please help with this ?

@radhika_tadiboyina

Are the users getting added?

Also the response would be 200 itself

Cheerd

Hi @radhika_tadiboyina

I think response codes for get and put commands are 200 only. It’s only for post command that response is 201.

Good way to check would be to verify if the info you are trying to update for a group is getting updated or not.

No. The users are not getting added. That is the problem. I am not getting any error but users are not getting added.


Steps followed :

  1. Get access token for scope PM.Group.
  2. Provided access to Update Group with Global partition id and DirectoryUserIDstoAdd : Tried with user email address, user id from get users call

I don’t see the user added to the group.

Hi @radhika_tadiboyina

Could you please check the group id again? This doesn’t look like group id to me, should be only digits and most likely under tag “Id” within a group info block.

Also please check the endpoint again.. I see ? Sign and groupId literal in your endpoint..
Below is what is mentioned in docs for update group api..

//cloud.uipath.com/{organizationName}/identity_/api/Group/{groupId}

Hi ,

Thanks for your responses. The one it is showing in the screenprint is not group id , its GlobalPartitionID. As per the documentation , Group ID is provided in the parameters.

The Put api call url i used is //cloud.uipath.com/{organizationName}/{Tenant}/identity_/api/Group/{GroupId}

Hi @radhika_tadiboyina

I see dynamo in your URL? is that the tenant name?

After giving this a thought, I think there should not be any tenant name in the url like other api calls as groups are something that are managed at organization level not the tenant level.

How did you fetch partitionGlobalId? did you fetch using api call? or api access settings from orchestrator? or from network traffic?

I am curious :thinking:

hi @radhika_tadiboyina

Just following up on this issue, were you able to resolve the issue?

If not, kindly get access token via below mentioned 2 scopes and hit update group call, it should resolve the issue for you:
PM.Group
PM.Group.Write

Hi Sonali,

No. It didn’t. Currently working with UiPath support on it. i will post it as soon as I get the resolution. thanks for checking.

hi @radhika_tadiboyina

if you provide endpoint like below and have 2 scopes assigned as I shared above, it works. I am able to update and get proper response.

https://cloud.uipath.com/{org name}/identity_/api/Group/{groupId}

Hi Sonali,

Sorry for the late reply. Yes dynamo in our tenant name. but it is not working with out the tenant name in the API call. I got the partitionGlobalid from developer tools i opened when i am adding the user to the orchestrator user group.

Hi @radhika_tadiboyina

I will share the steps I am following to make changes, please cross verify against what you are doing.

  1. Get Access Token using endpoint(GET):
    https://cloud.uipath.com/{{your org name}}/identity_/connect/token

Scope for this should include both of below scopes as you are trying to update group. You will not be able to make changes to the group unless you add both of these scopes:
PM.Group PM.Group.Write

  1. Retrieve access token using Step 1). Then use below endpoint(GET) to fetch all groups info. From its response, find the id for group you are trying to update.
    https://cloud.uipath.com/{{your org name}}/portal_/api/identity/Group/{{your partition global id}}/?partitionGlobalId={{your partition global id}}

  2. Now hit below endpoint(PUT) and raw json body to update your group:
    https://cloud.uipath.com/{{your org name}}/identity_/api/Group/{{your group id}}

Raw Json body:
{
“partitionGlobalId”: “your partition global id”,
“name”: “your group name”,
“directoryUserIDsToAdd”: [
“directory user identifier you want to add in the group”
],
“directoryUserIDsToRemove”: [

]
}

That’s it!! It works for me this way!

Please note:

  1. Tenant name is not required in any of the endpoints for this operation as groups are not managed at tenant level but platform/organization level.
  2. Its very important to add the right scopes (PM.Group and PM.Group.Write) in your external application registration as well as while fetching the access token.
  3. Use the endpoints exactly like I have suggested only replacing the values for org name, group id and partition id, rest everything remains the same.

Please try all these steps and let me know if it works for you.

Regards
Sonali

Hi Sonal,

Thanks for your response. I followed your instructions and it is not accepting the scope specified. I have checked the external applications platform permissions as well.


Could you suggest any more solutions on this ?

Hi @radhika_tadiboyina

Kindly remove the PM.Group.Read from external permissions scope and then retry,
I see you have added all 3 scopes there - PM.Group, PM.group.read, PM.Group.Write

Please note that all 3 scopes can not be selected at any given time for any of the api access, it throws invalid scope error.

Thanks. I removed PM.Group.Read and tried it with only PM.Group.Write permission and got the token. Update Group api call is throwing 405 method not allowed error.

Hi @radhika_tadiboyina

Your endpoint URL doesnt seem right for PUT operation.
It should be only like below, no parameter for this operation:

https://cloud.uipath.com/{your org name}/identity_/api/Group/{your group id}

I am able to add them. Thanks for your prompt response.

1 Like

@radhika_tadiboyina

I am glad it finally worked for you, been a long time coming :slight_smile:

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