Skip to content

Instantly share code, notes, and snippets.

@cmatskas
Created May 7, 2020 23:44
Show Gist options
  • Save cmatskas/6c4eec9d7a7686a917c3273c0191beb3 to your computer and use it in GitHub Desktop.
Save cmatskas/6c4eec9d7a7686a917c3273c0191beb3 to your computer and use it in GitHub Desktop.
public class GraphHelper
{
private static GraphServiceClient graphClient;
public static void Initialize(IAuthenticationProvider authProvider)
{
graphClient = new GraphServiceClient(authProvider);
}
public static async Task<IEnumerable<User>> GetUsersAsync()
{
// GET /users
return await graphClient.Users.Request().GetAsync();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment