How does one return a single specified user via Graph API?
I'm able to return all users, but need to acquire a single user via CLI arguments.
Figured it out, unfortunately it isn't documented anywhere, but it does allow filtering.
var users = await graphClient.Users.Request().Filter($"DisplayName eq '{name}'").GetAsync();
If you know the OID of your user, you can more simply do this:
var user = await graphClient.Users[OID].Request().GetAsync();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With