| copyright | Copyright IBM Corp. 2017 |
|---|---|
| link | search-for-people |
| is | future |
This is a sample GraphQL query to search for people by name. Here we are looking for people whose names contain "john", or
(optionally) a phonetically similar string. The requested property directMessageSpaceId will be populated for people with
whom we have an existing direct message conversation, and null for others within our organization with whom we have yet to
converse directly.
Other (optional) parameters which may be included are:
sources: Specify whether to search inDMs, sharedSPACES, and/or yourORGANIZATION(default if omitted is all sources)size: Maximum number of matching results to returnincludeRequester: A boolean indicating whether or not the requesting user should be included in results
{
searchPeople(name: "john", phonetic: true) {
items {
displayName
extId
email
directMessageSpaceId
}
}
Try it out with our GraphQL tool - Search for People