Unable to update user group via SCIM API

Description
We are trying to create user account using SCIM Create User API. The API was able to create user account but does not set the user group passed in the payload. It always sets the user group to the default group configured for the account. Can you confirm if this is a known issue and if a fix is targeted for future?
Error

Which App Type (OAuth / Chatbot / JWT / Webhook)?
It is a Server side APP using JWT

Which Endpoint/s?

How To Reproduce (If applicable)
Steps to reproduce the behavior:
Request body -
userPayload = {
“schemas”:[“urn:ietf:params:scim:schemas:core:2.0:User”],
“userName”:str(user_payload[‘email’]),
“userType”:str(user_payload[‘type’]),
“name”:{
“givenName”:str(user_payload[‘first_name’]),
“familyName”:str(user_payload[‘last_name’])
},
“groups”:[
{
“display”:str(user_payload[‘user_group’]),
“type”:“direct”,
“primary”:True
}
],
“title”:str(user_payload[‘job_title’]),
“locale”:str(user_payload[‘location’]),
“urn:ietf:params:scim:schemas:extension:enterprise:2.0:User”:{
“department”:str(user_payload[‘dept’]),
“organization”:str(user_payload[‘company’])
},
“urn:us:zoom:scim:schemas:extension:1.0:ZoomUser”:{
“loginType”:{
“workEmail”:False,
“sso”:True
}
}}

user_group reflected as part of groups is not reflected in the user account that was created.

Screenshots (If applicable)

Additional context
Add any other context about the problem here.

Hi @avilash_nallamothu,

Thanks for reaching out about this, and happy to take a closer look at this for you. Can you please let me know the name of the two groups? Both the one you’re trying to have applied to the user, and the one that’s being applied? If you can share the User ID as well, this would be helpful.

Thanks!
Will

@will.zoom Following are the details. As you can see the request was to add user to ‘Expert-Managers’ group but was added to Intuit-Default group.

API Url - https://api.zoom.us//scim2/users

Request Body -
{‘schemas’: [‘urn:ietf:params:scim:schemas:core:2.0:User’], ‘userName’: ‘XYZ’, ‘userType’: ‘Licensed’, ‘name’: {‘givenName’: ‘XYZ’, ‘familyName’: ‘XYZ’}, ‘groups’: [{‘display’: ‘Expert-Managers’, ‘type’: ‘direct’, ‘primary’: True}], ‘title’: ‘’, ‘locale’: ‘’, ‘urn:ietf:params:scim:schemas:extension:enterprise:2.0:User’: {‘department’: ‘’, ‘organization’: ‘’}, ‘urn:us:zoom:scim:schemas:extension:1.0:ZoomUser’: {‘loginType’: {‘workEmail’: False, ‘sso’: True}}}

Response:
{‘id’: ‘oaZ5RKpITNqhVipvsH6iBw’, ‘meta’: {‘resourceType’: ‘User’, ‘location’: ‘https://api.zoom.us/scim2/Users/oaZ5RKpITNqhVipvsH6iBw’, ‘version’: ‘1.0.0’}, ‘schemas’: [‘urn:ietf:params:scim:schemas:core:2.0:User’, ‘urn:ietf:params:scim:schemas:extension:enterprise:2.0:User’, ‘urn:us:zoom:scim:schemas:extension:1.0:ZoomUser’], ‘name’: {‘givenName’: ‘XYZ’, ‘familyName’: ‘XYZ’}, ‘emails’: [{‘type’: ‘work’, ‘value’: ‘XYZ’, ‘primary’: True}], ‘displayName’: ‘XYZ’, ‘userName’: 'XYZ, ‘active’: True, ‘userType’: ‘Licensed’, ‘roles’: [{‘display’: ‘user’, ‘value’: ‘user’, ‘primary’: True}], ‘groups’: [{‘display’: ‘Intuit-Default’, ‘type’: ‘direct’, ‘value’: ‘Intuit-Default’}], ‘urn:ietf:params:scim:schemas:extension:enterprise:2.0:User’: {‘department’: ‘’}, ‘urn:us:zoom:scim:schemas:extension:1.0:ZoomUser’: {‘loginType’: {‘workEmail’: False, ‘sso’: True}}}

Hi @avilash_nallamothu,

Thank you for sharing these details and for clarifying.

Can you double check that the request URL you’re using is valid? The one you’ve provided here has an extra / after api.zoom.us.

If that doesn’t resolve the issue, can you also try the following troubleshooting methods:

  • Add a "value": "string" field within your groups object and set the value to that of the display name
  • Try encapsulating the value for "primary" within a string instead of a boolean
  • Try removing the primary field entirely

If none of these affect the outcome, please let me know and I will further investigate.

Thanks!
Will

  • Add a "value": "string" field within your groups object and set the value to that of the display name - This fixed the issue.

May I ask you to update the documentation to reflect the same - https://marketplace.zoom.us/docs/api-reference/scim-api/user/userscim2create

Hi @avilash_nallamothu,

Thanks for confirming that adding a value field to your request fixed this issue. We will update our documentation to reflect this—apologies for any confusion!

Thanks again for pointing this out. :slight_smile:

Best,
Will

cc @shrijana.g

1 Like

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