In my C# application, I am using Microsoft Graph SDK with Azure AD implementation.
Please suggest me how to search users in my organisations (global contacts) based on search parameters . For example , if "Raj" is the search parameter, I should be able to get all users with their name contains "Raj" or email address contains "Raj". I found this method to get all users - "graphClient.Users.Request().GetAsync();". but, with this method limited response, I am not getting what exactly I want to search.
Thanks, Shashidhar
You can get the user information for the signed-in user by replacing /users/{id | userPrincipalName} with /me .
If users are logging in with work or school accounts (Azure AD), you can just look inside the access token to see a list of permissions like User. Read or Files. ReadWrite.
Adding to the previous answer: to accomplish this through the Graph C# SDK, use the Filter() method:
graphClient.Users.Request().Filter("startsWith(displayName, 'k')").GetAsync()
You can use other methods on the request to customize the request, e.g. Select(), etc.
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