Skip to content

Commit 77daa27

Browse files
authored
Added new constructor for GraphServiceClient
fixes #2354 Fixes [#]2354(#2354) -Allows Us to Overide the default Base URL in use cases such as GCC customers
1 parent f77a1c5 commit 77daa27

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/com/microsoft/graph/beta/serviceclient/GraphServiceClient.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ public GraphServiceClient(@Nonnull AuthenticationProvider authenticationProvider
6464
*/
6565
public GraphServiceClient(@Nonnull OkHttpClient client) {
6666
this(new AnonymousAuthenticationProvider(), client);
67+
}
68+
/**
69+
* Instantiate the GraphServiceClient using an AuthenticationProvider, baseUrl and OkHttpClient.
70+
* @param authenticationProvider The AuthenticationProvider for this GraphServiceClient.
71+
* @param client The OkHttpClient for the GraphServiceClient.
72+
* @param clouds The Clouds for the GraphServiceClient.
73+
*
74+
*/
75+
public GraphServiceClient(@Nonnull AuthenticationProvider authenticationProvider, @Nonnull OkHttpClient client, @Nonnull Clouds clouds) {
76+
this(new BaseGraphRequestAdapter(authenticationProvider, clouds, "v1.0", getGraphClientOptions()));
6777
}
6878
/**
6979
* Instantiate the GraphServiceClient using a TokenCredential and Scopes.

0 commit comments

Comments
 (0)