Exemple #1
0
 public static AADClient Create(OrganizationId organizationId, GraphProxyVersions apiVersion = GraphProxyVersions.Version14)
 {
     if (AADClientFactory.graphUrl.Value == null)
     {
         AADClientFactory.Tracer.TraceDebug(0L, "No GraphURL available, cannot create AADClient");
         return(null);
     }
     return(new AADClient(AADClientFactory.graphUrl.Value, AADClientFactory.GetTenantContextId(organizationId), AADClientFactory.GetAppCredentials(organizationId), apiVersion));
 }
Exemple #2
0
 public static AADClient Create(ADUser user)
 {
     if (AADClientFactory.graphUrl.Value == null)
     {
         AADClientFactory.Tracer.TraceDebug(0L, "No GraphURL available, cannot create AADClient");
         return(null);
     }
     return(new AADClient(AADClientFactory.graphUrl.Value, AADClientFactory.GetTenantContextId(user.OrganizationId), AADClientFactory.GetActAsUserCredentials(user), GraphProxyVersions.Version14));
 }