News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
SCIM Search/List Users does not return phoneNumbers Array nor simple phoneNumber string
Tags: rest api
Nov 4, 2021 at 6:57pm   •   1 replies  •  0 likes
Paul Rarey

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?

1 Answer
answered on Nov 4, 2021 at 7:53pm  

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' }
  ]
}

 1
on Dec 4, 2021 at 7:39pm   •  0 likes

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?


on Dec 6, 2021 at 8:53am   •  -1 likes

I don't understand what you meant "client-side". It's what I passed to RingCentral server and got that result. Can you clarify that?

on Dec 6, 2021 at 11:32am   •  -1 likes

Hey Phong,

Sorry for the confusion. I'll try to clarify...

Client-Side = processing done on the customer-side application that calls an RC API

Server-Side = processing done within the RC server, based on the API called and parameters passed by the Client-Side application.

What I missed in your initial response (with the codelet) was the API called was ~/scim/v2/users. I do see where the filter= can be applied for the RC server to process. Also that ~/scim/v2/users/.search uses JSON body vs. REST URL (without .search)

Appreciate your patience :)



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us