Skip to content

Commit 4393e3b

Browse files
authored
Added new constructor for GraphServiceClient
To resolve #2354
1 parent 91d519f commit 4393e3b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ public GraphServiceClient(@Nonnull RequestAdapter requestAdapter) {
5050
public GraphServiceClient(@Nonnull AuthenticationProvider authenticationProvider) {
5151
this(new BaseGraphRequestAdapter(authenticationProvider, null, "v1.0" , getGraphClientOptions()));
5252
}
53+
/**
54+
* Instantiate the GraphServiceClient using an AuthenticationProvider, baseUrl and OkHttpClient.
55+
* @param authenticationProvider The AuthenticationProvider for this GraphServiceClient.
56+
* @param client The OkHttpClient for the GraphServiceClient.
57+
* @param clouds The Clouds for the GraphServiceClient.
58+
*
59+
*/
60+
public GraphServiceClient(@Nonnull AuthenticationProvider authenticationProvider,@Nonnull OkHttpClient client, @Nonnull Clouds clouds) {
61+
this(new BaseGraphRequestAdapter(authenticationProvider, clouds, "v1.0", getGraphClientOptions()));
62+
}
5363
/**
5464
* Instantiate the GraphServiceClient using an AuthenticationProvider and OkHttpClient.
5565
* @param authenticationProvider The AuthenticationProvider for this GraphServiceClient.

0 commit comments

Comments
 (0)