Skip to content

list users: allow specific fields to be searched on, e.g. mobile number #22

@w-le

Description

@w-le

Currently list_users only matches on name/email.
https://github.com/PlaceOS/office365/blob/master/src/users.cr#L50

But a project needs to be able to search the graph directory for users that match a given mobile number

Let's just make this user search function able to take any combination of given field names (note MULTIPLE fields should be supported in a single request, not just one) and the value that it should match on for that field.

i.e. It should be just as flexible as MS Graph's odata filter params.

Here is the list of MS Graph user properties: https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties

MS Graph allows searching on any of them, with this very flexible filter format: https://docs.microsoft.com/en-us/graph/aad-advanced-queries
We should ideally be able to offer similarly flexible search/filter functions, otherwise there will inevitably be functionality that our staff-api will not be able to offer.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions