Assign 'USER_ADMIN' role to the user → POST /api/v1/users/{{userId}}/roles (Body → { type: 'USER_ADMIN' })
Add Group Target to 'USER_ADMIN' role → PUT /api/v1/users/{{userId}}/roles/{{roleId}}/targets/groups/{{groupId}}
List Group Targets for role → GET /api/v1/users/{{userId}}/roles/{{roleId}}/targets/groups
Remove Group Target from Admin User Role and verify removed → DELETE /api/v1/users/{{userId}}/roles/{{roleId}}/targets/groups/{{groupId}}
Don’t remove the last group target from a role assignment, as this causes an exception.
To get around this, create a new group and add this group target to user admin role
Create another group and add this group target to user admin role
Now remove the group created in step 2 from the group target role
Delete the group and user → POST /api/v1/users/{{userId}}/lifecycle/deactivate + DELETE /api/v1/users/{{userId}} + DELETE /api/v1/groups/{{groupId}}