Skip to content

Instantly share code, notes, and snippets.

@cmatskas
Created May 20, 2020 01:12
Show Gist options
  • Save cmatskas/701080780127e73eccb2d3b576bb081b to your computer and use it in GitHub Desktop.
Save cmatskas/701080780127e73eccb2d3b576bb081b to your computer and use it in GitHub Desktop.
using Microsoft.Graph;
namespace GraphServiceApi
{
public class GraphClient
{
private GraphServiceClient serviceClient;
public GraphServiceClient ServiceClient
{
get
{
if (serviceClient != null)
{
return serviceClient;
}
serviceClient = new GraphServiceClient(AuthenticationProvider.AuthProvider);
return serviceClient;
}
}
public GraphClientAuthProvider AuthenticationProvider { get; }
public GraphClient(GraphClientAuthProvider authProvider)
{
AuthenticationProvider = authProvider;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment