Skip to main content
Question

SCIM Search/List Users does not return phoneNumbers Array nor simple phoneNumber string

  • November 5, 2021
  • 2 replies
  • 306 views

Subject pretty much sums up the issue.

Endpoint URI tested:
https://platform.ringcentral.com/scim/v2/Users
https://platform.ringcentral.com/scim/Users
https://platform.ringcentral.com
/scim/v2/Users/.search

The endpoint https://platform.ringcentral.com/scim/v2/Users/id does return the phoneNumbers array, both the assigned phoneNumber (DID) and assigned extensionNumber values.

Is there a reason the ~/scim{/v2}/Users{/.search} endpoints do not return the PhoneNumbers array?

2 replies

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2340 replies
  • November 5, 2021

Search does return the phoneNumbers array for me

async function search_user() {
    var params = {
          filter: 'userName eq "ryan.lee@live.com"'
    }
    try {
      var resp = await platform.get('https://platform.ringcentral.com/scim/v2/Users', params)
      console.log(resp)
      var jsonObj = await resp.json()
      for (var res of jsonObj.Resources)
        console.log(res)
    }catch(e){
        console.log(e)
    }
}
// Response
{
  schemas: [ 'urn:ietf:params:scim:schemas:core:2.0:User' ],
  id: '62358325016',
  meta: {
    resourceType: 'User',
    created: '2021-11-05T02:50:47.257Z',
    lastModified: '2021-11-05T02:50:47.257Z',
    location: 'https://platform.ringcentral.com/scim/v2/Users/62358325016'
  },
  userName: 'ryan.lee@live.com',
  name: { formatted: 'Ryan Lee', familyName: 'Lee', givenName: 'Ryan' },
  active: false,
  emails: [ { value: 'ryan.lee@live.com', type: 'work' } ],
  phoneNumbers: [
    { value: '+13033763519', type: 'work' },
    { value: '11889', type: 'other' }
  ]
}

Hey Phong - Many thanks for the code example.

I believe the search filter is applied to results on the client-side, yes?

AOK for a hundred or so users/Extensions. A few thousand, that would create rather thick return array when only one Email address is the search objective.

Of course, if the search/filter is applied server-side, returning only the details of the queried userName (Email address).

If the filter is applied server-side, where might I find the various filters than can be applied to such queries?



Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings