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
Search User By email Or userName
Tags: rest api
May 13, 2022 at 9:52am   •   1 replies  •  0 likes
Sy Hasan

Hi there, as I continue to learn more about the RingCentral API, I was curious to know how I would go about filtering and finding a user by a specific email or userName? Here is how I am currently searching:

method: GET,

content_type: application/json,

url: https://platform.ringcentral.com/scim/v2/Users?filter=&userName=testuser@email.com


I don't receive the results I would want from this sadly, as it gives me the default response of getting 100 items. I used this reference: https://developers.ringcentral.com/api-reference/SCIM/searchViaGet2

The startIndex and count work fine, but it is the filter parameter I am having trouble with.

Thank you!

1 Answer
answered on May 13, 2022 at 12:01pm  

You have to use SCIM filter syntax. Currently, we support only "eq" operator. Here is an example in Node JS

async function list_users_v2() {
  try{
    var params = {
      filter: "userName eq \"ryan.lee@live.com\"",
    }
    var resp = await platform.post("/scim/v2/Users/.search", params)
    var jsonObj = await resp.json()
    for (var item of jsonObj.Resources){
        console.log(JSON.stringify(item))
        console.log("==========")
    }
  }catch(e){
    console.log(e)
  }
}

 0



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