Paul Rarey avatar image
Paul Rarey asked Paul Rarey (AA) commented

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

Subject pretty much sums up the issue.

Endpoint URI tested:

The endpoint 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?

rest api
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered Paul Rarey (AA) commented

Search does return the phoneNumbers array for me

async function search_user() {
    var params = {
          filter: 'userName eq ""'
    try {
      var resp = await platform.get('', params)
      var jsonObj = await resp.json()
      for (var res of jsonObj.Resources)
// 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: ''
  userName: '',
  name: { formatted: 'Ryan Lee', familyName: 'Lee', givenName: 'Ryan' },
  active: false,
  emails: [ { value: '', type: 'work' } ],
  phoneNumbers: [
    { value: '+13033763519', type: 'work' },
    { value: '11889', type: 'other' }
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Paul Rarey (AA) avatar image Paul Rarey (AA) commented ·

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?

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Paul Rarey (AA) commented ·

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?

-1 Like -1 ·
Paul Rarey (AA) avatar image Paul Rarey (AA) Phong Vu ♦♦ commented ·

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 :)

-1 Like -1 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys