~Rama.
Original Message:
Sent: Thu April 17, 2025 10:15 AM
From: Carmine Salvatore
Subject: How to automatically add users in group using registration flow designer
Hi Ramakrishna and thanks for your support!
I followed your suggestion and I can add the user to a group.
Now I want to try and modify my function so that the authorization token is not static but is generated by the system.
do you know how to do it?
Best regards
------------------------------
Carmine Salvatore
Original Message:
Sent: Mon March 31, 2025 11:31 AM
From: Ramakrishna Gorthi
Subject: How to automatically add users in group using registration flow designer
Hey Carmine,
I agree with Peter in his response below. You would need to create the user first and then you would need to update the group membership.
Here's a code snippet for reference:
**
- context: endPoint := "https://<YourTenantHostname>/v2.0/Groups/<Your group ID goes here>"
- context: >
payload := jsonToString({
"Operations": [{
"op": "add",
"path": "members",
"value": [{
"type": "user",
"value": The User ID of your user goes here.
}]
}],
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"]
})
- context: response := hc.Patch(context.endPoint,{"Authorization":'Your token goes here',"Content-Type":"application/scim+json"},context.payload)
**
I'm just sharing a happy path snippet here. Would leave enhancing this logic to handle errors / -ve scenarios / response code parsing etc.
Of course, again as Peter shared below, you can leverage debug statements to get further details on your function block execution.
Let me know if that helps.
------------------------------
Ramakrishna Gorthi
IBM
Pune
Original Message:
Sent: Fri March 28, 2025 07:38 AM
From: Carmine Salvatore
Subject: How to automatically add users in group using registration flow designer
Hi team,
I'm working on IBM Security Verify and my goal is to automatically add a user to a group during the registration phase.
I have created a flow designer to achieve this, but when I test its functionality, the user is created but is not assigned to any group.
This is my flow designer:
In this flow I have specified the group ID to which the user should be added
The number 4 represents the identifier of the group attribute obtained via an API call.
{
"id": "4",
"name": "groupIds",
"description": "The list of groups that the user belongs to.",
"scope": "global",
"sourceType": "schema",
"datatype": "string[]",
"tags": [
"sso",
"prov"
],
"credName": "groupIds",
"schemaAttribute": {
"name": "ibm-allGroups",
"attributeName": "groups",
"scimName": "groups",
"customAttribute": false
},
"displayName": "Group IDs"
}
Does anyone knows how to help me?
Thanks for your availability
------------------------------
Carmine Salvatore
------------------------------