Skip to main content


Hello,

I’m trying to pull a list of users (https://developers.ringcentral.com/api-reference/SCIM/scimSearchViaGet2) with their phone numbers, however when the list contains multiple users, the phoneNumbers array is omitted.  I found this post from a few years ago with a similar question 

https://community.ringcentral.com/developer-platform-apis-integrations-5/scim-search-list-users-does-not-return-phonenumbers-array-nor-simple-phonenumber-string-2611

but it looks like Phong only tested it with a filter on a single user.

 

Python code for pulling a single user (same result when using the filter param):

    queryParams = {
'startIndex': 2,
'count': 1
}

rcsdk = SDK(CLIENT_ID, CLIENT_SECRET, SERVER_URL)
platform = rcsdk.platform()
try:
platform.login( jwt= JWT_TOKEN )
except Exception as e:
sys.exit("Unable to authenticate to platform: " + str(e))

response = platform.get('/scim/v2/Users', queryParams)
print(response.text())

Here is the response for a single user (with info removed):

  "Resources" : u {
"schemas" : h "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" ],
"id" : "idnumber1",
"meta" : {
"resourceType" : "User",
"created" : "2023-04-18T23:46:41.000Z",
"lastModified" : "2023-04-18T23:46:41.000Z",
"location" : "https://platform.ringcentral.com/scim/v2/Users/idnumber1"
},
"userName" : "user.name1@company.com",
"name" : {
"formatted" : "user name",
"familyName" : "name1",
"givenName" : "user"
},
"title" : "user1 title",
"active" : true,
"emails" : m {
"value" : "user.name1@company.com",
"type" : "work"
} ],
"phoneNumbers" : m {
"value" : "+15555555555",
"type" : "work"
}, {
"value" : "+15555555556",
"type" : "mobile"
}, {
"value" : "5555",
"type" : "other"
} ],
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" : {
"department" : "department"
}
} ]

 

versus when I’m pulling multiple (2+):

    queryParams = {
'startIndex': 2,
'count': 2
}

rcsdk = SDK(CLIENT_ID, CLIENT_SECRET, SERVER_URL)
platform = rcsdk.platform()
try:
platform.login( jwt= JWT_TOKEN )
except Exception as e:
sys.exit("Unable to authenticate to platform: " + str(e))

response = platform.get('/scim/v2/Users', queryParams)
print(response.text())

 and the corresponding response:

  "Resources" : R {
"schemas" : "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" ],
"id" : "idnumber1",
"meta" : {
"resourceType" : "User",
"created" : "2023-04-18T23:46:41.000Z",
"lastModified" : "2023-04-18T23:46:41.000Z",
"location" : "https://platform.ringcentral.com/scim/v2/Users/idnumber1"
},
"userName" : "user.name1@company.com",
"name" : {
"formatted" : "user name1",
"familyName" : "name1",
"givenName" : "user"
},
"title" : "user1 title",
"active" : true,
"emails" : {
"value" : "user.name1@company.com",
"type" : "work"
} ],
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" : {
"department" : "department"
}
}, {
"schemas" : "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" ],
"id" : "idnumber2",
"meta" : {
"resourceType" : "User",
"created" : "2023-04-18T23:46:42.000Z",
"lastModified" : "2023-04-18T23:46:42.000Z",
"location" : "https://platform.ringcentral.com/scim/v2/Users/idnumber2"
},
"userName" : "user.name2@company.com",
"name" : {
"formatted" : "user name2",
"familyName" : "name2",
"givenName" : "user"
},
"title" : "user2 title",
"active" : true,
"emails" : {
"value" : "user.name2@company.com",
"type" : "work"
} ],
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" : {
"department" : "department"
}
} ]

 

Is this intended behavior, or am I doing something wrong?  The API reference page’s GET response example for startIndex=1&count=3 shows multiple users along with their phoneNumbers. 

 

Thanks

I tested and observe the same issue. Let me check with the platform team to see if it can be fixed.

You also wrote “The API reference page’s GET response example for startIndex=1&count=3 shows multiple users along with their phoneNumbers.“

However, in by test using the API reference page, I did not get the phoneNumbersN] if the count value is greater than 1. Can you retest and let me know.

UPDATE:

I checked with the platform team and they said the observed behavior is the current limitation due to server optimization. So there will be no fix at any time soon.

I recommend you to use this API to list company users info instead of using the SCIM endpoint. Please check and and let me know if it satisfies your needs.


Reply