# Unable to update user group via SCIM API

**URL:** <https://devforum.zoom.us/t/unable-to-update-user-group-via-scim-api/38382>\
**Category:** API and Webhooks\
**Created:** [December 14, 2020, 9:45pm UTC](https://devforum.zoom.us/t/unable-to-update-user-group-via-scim-api/38382 "2020-12-14T21:45:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![avilash\_nallamothu](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@avilash\_nallamothu](https://devforum.zoom.us/u/avilash_nallamothu)\
**Post date:** [December 14, 2020, 9:45pm UTC](https://devforum.zoom.us/t/unable-to-update-user-group-via-scim-api/38382/1 "2020-12-14T21:45:28Z")

</div>

**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?**

> **[Create a User - User - SCIM2 API - API Reference](https://marketplace.zoom.us/docs/api-reference/scim-api/user/userscim2create)**
>
> Create a new user under your account.
> OAuth Scope: scim2
> 
> Authorization
> 
> Flow: authorizationCode
> 
> Authorization URL: https://zoom.us/oauth/authoriz...

**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.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [December 15, 2020, 7:46pm UTC](https://devforum.zoom.us/t/unable-to-update-user-group-via-scim-api/38382/2 "2020-12-15T19:46:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![avilash\_nallamothu](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@avilash\_nallamothu](https://devforum.zoom.us/u/avilash_nallamothu)\
**Post date:** [December 16, 2020, 11:24pm UTC](https://devforum.zoom.us/t/unable-to-update-user-group-via-scim-api/38382/3 "2020-12-16T23:24:31Z")

</div>

@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](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](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}}}

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [December 17, 2020, 5:41pm UTC](https://devforum.zoom.us/t/unable-to-update-user-group-via-scim-api/38382/4 "2020-12-17T17:41:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![avilash\_nallamothu](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@avilash\_nallamothu](https://devforum.zoom.us/u/avilash_nallamothu)\
**Post date:** [December 17, 2020, 11:05pm UTC](https://devforum.zoom.us/t/unable-to-update-user-group-via-scim-api/38382/5 "2020-12-17T23:05:48Z")

</div>

- 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](https://marketplace.zoom.us/docs/api-reference/scim-api/user/userscim2create)

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [December 18, 2020, 6:04pm UTC](https://devforum.zoom.us/t/unable-to-update-user-group-via-scim-api/38382/6 "2020-12-18T18:04:39Z")

</div>

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. 🙂

Best,  
Will

cc @shrijana.g

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [January 18, 2021, 4:04am UTC](https://devforum.zoom.us/t/unable-to-update-user-group-via-scim-api/38382/7 "2021-01-18T04:04:47Z")

</div>

Closed on January 18, 2021, 4:04am UTC

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