diff --git a/src/main/java/com/microsoft/graph/serviceclient/GraphServiceClient.java b/src/main/java/com/microsoft/graph/serviceclient/GraphServiceClient.java index 83d633f8781..e9308ced1f3 100644 --- a/src/main/java/com/microsoft/graph/serviceclient/GraphServiceClient.java +++ b/src/main/java/com/microsoft/graph/serviceclient/GraphServiceClient.java @@ -2,6 +2,7 @@ import com.microsoft.graph.core.CoreConstants; import com.microsoft.graph.core.requests.BaseGraphRequestAdapter; +import com.microsoft.graph.core.requests.BaseGraphRequestAdapter.Clouds; import com.microsoft.graph.core.requests.BatchRequestBuilder; import com.microsoft.graph.core.requests.options.GraphClientOption; import com.microsoft.graph.core.requests.IBaseClient; @@ -50,6 +51,17 @@ public GraphServiceClient(@Nonnull RequestAdapter requestAdapter) { public GraphServiceClient(@Nonnull AuthenticationProvider authenticationProvider) { this(new BaseGraphRequestAdapter(authenticationProvider, null, "v1.0" , getGraphClientOptions())); } + /** + * Instantiate the GraphServiceClient using an AuthenticationProvider, Cloud and OkHttpClient. + * @param authenticationProvider The AuthenticationProvider for this GraphServiceClient. + * @param client The OkHttpClient for the GraphServiceClient. + * @param clouds The Clouds for the GraphServiceClient. + * + */ + @SuppressWarnings("LambdaLast") + public GraphServiceClient(@Nonnull AuthenticationProvider authenticationProvider, @Nonnull OkHttpClient client, @Nonnull Clouds clouds) { + this(new BaseGraphRequestAdapter(authenticationProvider, clouds, "v1.0", client)); + } /** * Instantiate the GraphServiceClient using an AuthenticationProvider and OkHttpClient. * @param authenticationProvider The AuthenticationProvider for this GraphServiceClient.