Class GraphServiceClient
java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
com.microsoft.graph.BaseGraphServiceClient
com.microsoft.graph.serviceclient.GraphServiceClient
- All Implemented Interfaces:
com.microsoft.graph.core.requests.IBaseClient
public class GraphServiceClient
extends BaseGraphServiceClient
implements com.microsoft.graph.core.requests.IBaseClient
-
Field Summary
Fields inherited from class com.microsoft.kiota.BaseRequestBuilder
pathParameters, requestAdapter, urlTemplate -
Constructor Summary
ConstructorsConstructorDescriptionGraphServiceClient(com.azure.core.credential.TokenCredential tokenCredential, String... scopes) Instantiate the GraphServiceClient using a TokenCredential and Scopes.GraphServiceClient(com.microsoft.kiota.authentication.AuthenticationProvider authenticationProvider) Instantiate the GraphServiceClient using an AuthenticationProvider.GraphServiceClient(com.microsoft.kiota.authentication.AuthenticationProvider authenticationProvider, okhttp3.OkHttpClient client) Instantiate the GraphServiceClient using an AuthenticationProvider and OkHttpClient.GraphServiceClient(com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a new GraphServiceClient and sets the default values.GraphServiceClient(okhttp3.OkHttpClient client) Instantiate the GraphServiceClient using an OkHttpClient -
Method Summary
Modifier and TypeMethodDescriptioncom.microsoft.graph.core.requests.BatchRequestBuilderGets the BatchRequestBuilder for the GraphServiceClient.static com.microsoft.graph.core.requests.options.GraphClientOptionSets a few basic values for the GraphClientOptions to pass to the client.com.microsoft.kiota.RequestAdapterGets the RequestAdapter for the GraphServiceClient.me()Provides operations to manage the user singleton.voidsetRequestAdapter(com.microsoft.kiota.RequestAdapter requestAdapter) Sets the RequestAdapter for the GraphServiceClient.Methods inherited from class com.microsoft.graph.BaseGraphServiceClient
admin, agreementAcceptances, agreements, appCatalogs, applications, applicationsWithAppId, applicationsWithUniqueName, applicationTemplates, auditLogs, authenticationMethodConfigurations, authenticationMethodsPolicy, certificateBasedAuthConfiguration, chats, communications, compliance, connections, contacts, contracts, dataPolicyOperations, deviceAppManagement, deviceManagement, devices, devicesWithDeviceId, directory, directoryObjects, directoryRoles, directoryRolesWithRoleTemplateId, directoryRoleTemplates, domainDnsRecords, domains, drives, education, employeeExperience, external, filterOperators, functions, groupLifecyclePolicies, groups, groupSettings, groupSettingTemplates, groupsWithUniqueName, identity, identityGovernance, identityProtection, identityProviders, informationProtection, invitations, oauth2PermissionGrants, organization, permissionGrants, places, planner, policies, print, privacy, reports, roleManagement, schemaExtensions, scopedRoleMemberships, search, security, servicePrincipals, servicePrincipalsWithAppId, shares, sites, solutions, storage, subscribedSkus, subscriptions, teams, teamsTemplates, teamwork, tenantRelationships, users, usersWithUserPrincipalName
-
Constructor Details
-
GraphServiceClient
public GraphServiceClient(@Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a new GraphServiceClient and sets the default values.- Parameters:
requestAdapter- The request adapter to use to execute the requests.
-
GraphServiceClient
public GraphServiceClient(@Nonnull com.microsoft.kiota.authentication.AuthenticationProvider authenticationProvider) Instantiate the GraphServiceClient using an AuthenticationProvider.- Parameters:
authenticationProvider- The AuthenticationProvider for this GraphServiceClient.
-
GraphServiceClient
public GraphServiceClient(@Nonnull com.microsoft.kiota.authentication.AuthenticationProvider authenticationProvider, @Nonnull okhttp3.OkHttpClient client) Instantiate the GraphServiceClient using an AuthenticationProvider and OkHttpClient.- Parameters:
authenticationProvider- The AuthenticationProvider for this GraphServiceClient.client- The OkHttpClient for the GraphServiceClient.
-
GraphServiceClient
public GraphServiceClient(@Nonnull okhttp3.OkHttpClient client) Instantiate the GraphServiceClient using an OkHttpClient- Parameters:
client- The OkHttpClient for the GraphServiceClient.
-
GraphServiceClient
public GraphServiceClient(@Nonnull com.azure.core.credential.TokenCredential tokenCredential, @Nullable String... scopes) Instantiate the GraphServiceClient using a TokenCredential and Scopes.- Parameters:
tokenCredential- The TokenCredential for this GraphServiceClient.scopes- The Scopes for this GraphServiceClient.
-
-
Method Details
-
getGraphClientOptions
@Nonnull public static com.microsoft.graph.core.requests.options.GraphClientOption getGraphClientOptions()Sets a few basic values for the GraphClientOptions to pass to the client.- Returns:
- the GraphClientOptions instance for the GraphServiceClient.
-
setRequestAdapter
public void setRequestAdapter(@Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Sets the RequestAdapter for the GraphServiceClient.- Specified by:
setRequestAdapterin interfacecom.microsoft.graph.core.requests.IBaseClient- Parameters:
requestAdapter- the request adapter to use to execute the requests.
-
getRequestAdapter
@Nonnull public com.microsoft.kiota.RequestAdapter getRequestAdapter()Gets the RequestAdapter for the GraphServiceClient.- Specified by:
getRequestAdapterin interfacecom.microsoft.graph.core.requests.IBaseClient- Returns:
- the request adapter to use to execute the requests.
-
getBatchRequestBuilder
@Nonnull public com.microsoft.graph.core.requests.BatchRequestBuilder getBatchRequestBuilder()Gets the BatchRequestBuilder for the GraphServiceClient.- Specified by:
getBatchRequestBuilderin interfacecom.microsoft.graph.core.requests.IBaseClient- Returns:
- the BatchRequestBuilder for the GraphServiceClient.
-
me
Provides operations to manage the user singleton.- Returns:
- the request builder for the user singleton.
-