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 com.microsoft.graph.BaseGraphServiceClient implements com.microsoft.graph.core.requests.IBaseClient
  • Field Summary

    Fields inherited from class com.microsoft.kiota.BaseRequestBuilder

    pathParameters, requestAdapter, urlTemplate
  • Constructor Summary

    Constructors
    Constructor
    Description
    GraphServiceClient(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.authentication.AuthenticationProvider authenticationProvider, okhttp3.OkHttpClient client, com.microsoft.graph.core.requests.BaseGraphRequestAdapter.Clouds clouds)
    Instantiate the GraphServiceClient using an AuthenticationProvider, Cloud 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 Type
    Method
    Description
    com.microsoft.graph.core.requests.BatchRequestBuilder
    Gets the BatchRequestBuilder for the GraphServiceClient.
    static com.microsoft.graph.core.requests.options.GraphClientOption
    Sets a few basic values for the GraphClientOptions to pass to the client.
    com.microsoft.kiota.RequestAdapter
    Gets the RequestAdapter for the GraphServiceClient.
    com.microsoft.graph.users.item.UserItemRequestBuilder
    me()
    Provides operations to manage the user singleton.
    void
    setRequestAdapter(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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, @Nonnull com.microsoft.graph.core.requests.BaseGraphRequestAdapter.Clouds clouds)
      Instantiate the GraphServiceClient using an AuthenticationProvider, Cloud and OkHttpClient.
      Parameters:
      authenticationProvider - The AuthenticationProvider for this GraphServiceClient.
      client - The OkHttpClient for the GraphServiceClient.
      clouds - The Clouds for the 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:
      setRequestAdapter in interface com.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:
      getRequestAdapter in interface com.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:
      getBatchRequestBuilder in interface com.microsoft.graph.core.requests.IBaseClient
      Returns:
      the BatchRequestBuilder for the GraphServiceClient.
    • me

      @Nonnull public com.microsoft.graph.users.item.UserItemRequestBuilder me()
      Provides operations to manage the user singleton.
      Returns:
      the request builder for the user singleton.