Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
w-le opened this issue Jul 8, 2021 · 0 comments
Open
Labels

Comments

@w-le
Copy link
Contributor

w-le commented Jul 8, 2021

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.

@w-le w-le added type: enhancement new feature or request priority: medium labels Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant