msgraphsdkgo

package module
v0.44.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 118 Imported by: 110

README ¶

Microsoft Graph SDK for Go

PkgGoDev

Get started with the Microsoft Graph SDK for Go by integrating the Microsoft Graph API into your Go application!

Note: this SDK allows you to build applications using the v1.0 of Microsoft Graph. If you want to try the latest Microsoft Graph APIs under beta, use our beta SDK instead.

Note: the Microsoft Graph Go SDK is currently in Community Preview. During this period we're expecting breaking changes to happen to the SDK based on community's feedback. Checkout the known limitations.

1. Installation

go get github.com/microsoftgraph/msgraph-sdk-go
go get github.com/microsoft/kiota-authentication-azure-go

2. Getting started

2.1 Register your application

Register your application by following the steps at Register your app with the Microsoft Identity Platform.

2.2 Create an AuthenticationProvider object

An instance of the GraphRequestAdapter class handles building client. To create a new instance of this class, you need to provide an instance of AuthenticationProvider, which can authenticate requests to Microsoft Graph.

For an example of how to get an authentication provider, see choose a Microsoft Graph authentication provider.

Note: we are working to add the getting started information for Go to our public documentation, in the meantime the following sample should help you getting started.

import (
    azidentity "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
    a          "github.com/microsoft/kiota-authentication-azure-go"
    "context"
)

cred, err := azidentity.NewDeviceCodeCredential(&azidentity.DeviceCodeCredentialOptions{
    TenantID: "<the tenant id from your app registration>",
    ClientID: "<the client id from your app registration>",
    UserPrompt: func(ctx context.Context, message azidentity.DeviceCodeMessage) error {
        fmt.Println(message.Message)
        return nil
    },
})

if err != nil {
    fmt.Printf("Error creating credentials: %v\n", err)
}

2.3 Get a Graph Service Client and Adapter object

You must get a GraphRequestAdapter object to make requests against the service.

import msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"

client , err  := msgraphsdk.NewGraphServiceClientWithCredentials(cred, []string{"Files.Read"})
if err != nil {
    fmt.Printf("Error creating client: %v\n", err)
    return
}

3. Make requests against the service

After you have a GraphServiceClient that is authenticated, you can begin making calls against the service. The requests against the service look like our REST API.

3.1 Get the user's drive

To retrieve the user's drive:

import (
    "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)

result, err := client.Me().Drive().Get(context.Background(), nil)
if err != nil {
    fmt.Printf("Error getting the drive: %v\n", err)
    printOdataError(err)
}
fmt.Printf("Found Drive : %v\n", *result.GetId())

// omitted for brevity

func printOdataError(err error) {
	switch err.(type) {
	case *odataerrors.ODataError:
		typed := err.(*odataerrors.ODataError)
		fmt.Printf("error:", typed.Error())
		if terr := typed.GetError(); terr != nil {
			fmt.Printf("code: %s", *terr.GetCode())
			fmt.Printf("msg: %s", *terr.GetMessage())
		}
	default:
		fmt.Printf("%T > error: %#v", err, err)
	}
}

4. Getting results that span across multiple pages

Items in a collection response can span across multiple pages. To get the complete set of items in the collection, your application must make additional calls to get the subsequent pages until no more next link is provided in the response.

4.1 Get all the users in an environment

To retrieve the users:

import (
    msgraphcore "github.com/microsoftgraph/msgraph-sdk-go-core"
    "github.com/microsoftgraph/msgraph-sdk-go/users"
    "github.com/microsoftgraph/msgraph-sdk-go/models"
    "github.com/microsoftgraph/msgraph-sdk-go/models/odataerrors"
)

result, err := client.Users().Get(context.Background(), nil)
if err != nil {
    fmt.Printf("Error getting users: %v\n", err)
    printOdataError(err error)
    return err
}

// Use PageIterator to iterate through all users
pageIterator, err := msgraphcore.NewPageIterator(result, client.GetAdapter(), models.CreateUserCollectionResponseFromDiscriminatorValue)

err = pageIterator.Iterate(context.Background(), func(pageItem interface{}) bool {
    user := pageItem.(models.Userable)
    fmt.Printf("%s\n", *user.GetDisplayName())
    // Return true to continue the iteration
    return true
})

// omitted for brevity

func printOdataError(err error) {
        switch err.(type) {
        case *odataerrors.ODataError:
                typed := err.(*odataerrors.ODataError)
                fmt.Printf("error:", typed.Error())
                if terr := typed.GetError(); terr != nil {
                        fmt.Printf("code: %s", *terr.GetCode())
                        fmt.Printf("msg: %s", *terr.GetMessage())
                }
        default:
                fmt.Printf("%T > error: %#v", err, err)
        }
}

5. Documentation

For more detailed documentation, see:

6. Issues

For known issues, see issues.

7. Contributions

The Microsoft Graph SDK is open for contribution. To contribute to this project, see Contributing.

8. License

Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT license.

9. Third-party notices

Third-party notices

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

func GetDefaultClientOptions ¶ added in v0.2.1

func GetDefaultClientOptions() core.GraphClientOptions

GetDefaultClientOptions returns the default client options used by the GraphRequestAdapterBase and the middleware.

Types ¶

type GraphBaseServiceClient ¶ added in v0.41.0

type GraphBaseServiceClient struct {
	// contains filtered or unexported fields
}

GraphBaseServiceClient the main entry point of the SDK, exposes the configuration and the fluent API.

func NewGraphBaseServiceClient ¶ added in v0.41.1

NewGraphBaseServiceClient instantiates a new GraphBaseServiceClient and sets the default values.

func (*GraphBaseServiceClient) Admin ¶ added in v0.41.0

Admin the admin property

func (*GraphBaseServiceClient) AgreementAcceptances ¶ added in v0.41.0

AgreementAcceptances the agreementAcceptances property

func (*GraphBaseServiceClient) AgreementAcceptancesById ¶ added in v0.41.0

AgreementAcceptancesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.agreementAcceptances.item collection

func (*GraphBaseServiceClient) Agreements ¶ added in v0.41.0

Agreements the agreements property

func (*GraphBaseServiceClient) AgreementsById ¶ added in v0.41.0

AgreementsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.agreements.item collection

func (*GraphBaseServiceClient) AppCatalogs ¶ added in v0.41.0

AppCatalogs the appCatalogs property

func (*GraphBaseServiceClient) ApplicationTemplates ¶ added in v0.41.0

ApplicationTemplates the applicationTemplates property

func (*GraphBaseServiceClient) ApplicationTemplatesById ¶ added in v0.41.0

ApplicationTemplatesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.applicationTemplates.item collection

func (*GraphBaseServiceClient) Applications ¶ added in v0.41.0

Applications the applications property

func (*GraphBaseServiceClient) ApplicationsById ¶ added in v0.41.0

ApplicationsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.applications.item collection

func (*GraphBaseServiceClient) AuditLogs ¶ added in v0.41.0

AuditLogs the auditLogs property

func (*GraphBaseServiceClient) AuthenticationMethodConfigurations ¶ added in v0.41.0

AuthenticationMethodConfigurations the authenticationMethodConfigurations property

func (*GraphBaseServiceClient) AuthenticationMethodConfigurationsById ¶ added in v0.41.0

AuthenticationMethodConfigurationsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.authenticationMethodConfigurations.item collection

func (*GraphBaseServiceClient) AuthenticationMethodsPolicy ¶ added in v0.41.0

AuthenticationMethodsPolicy the authenticationMethodsPolicy property

func (*GraphBaseServiceClient) Branding ¶ added in v0.41.0

Branding the branding property

func (*GraphBaseServiceClient) CertificateBasedAuthConfiguration ¶ added in v0.41.0

CertificateBasedAuthConfiguration the certificateBasedAuthConfiguration property

func (*GraphBaseServiceClient) CertificateBasedAuthConfigurationById ¶ added in v0.41.0

CertificateBasedAuthConfigurationById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.certificateBasedAuthConfiguration.item collection

func (*GraphBaseServiceClient) Chats ¶ added in v0.41.0

Chats the chats property

func (*GraphBaseServiceClient) ChatsById ¶ added in v0.41.0

ChatsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.chats.item collection

func (*GraphBaseServiceClient) Communications ¶ added in v0.41.0

Communications the communications property

func (*GraphBaseServiceClient) Compliance ¶ added in v0.41.0

Compliance the compliance property

func (*GraphBaseServiceClient) Connections ¶ added in v0.41.0

Connections the connections property

func (*GraphBaseServiceClient) ConnectionsById ¶ added in v0.41.0

ConnectionsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.connections.item collection

func (*GraphBaseServiceClient) Contacts ¶ added in v0.41.0

Contacts the contacts property

func (*GraphBaseServiceClient) ContactsById ¶ added in v0.41.0

ContactsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.contacts.item collection

func (*GraphBaseServiceClient) Contracts ¶ added in v0.41.0

Contracts the contracts property

func (*GraphBaseServiceClient) ContractsById ¶ added in v0.41.0

ContractsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.contracts.item collection

func (*GraphBaseServiceClient) DataPolicyOperations ¶ added in v0.41.0

DataPolicyOperations the dataPolicyOperations property

func (*GraphBaseServiceClient) DataPolicyOperationsById ¶ added in v0.41.0

DataPolicyOperationsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.dataPolicyOperations.item collection

func (*GraphBaseServiceClient) DeviceAppManagement ¶ added in v0.41.0

DeviceAppManagement the deviceAppManagement property

func (*GraphBaseServiceClient) DeviceManagement ¶ added in v0.41.0

DeviceManagement the deviceManagement property

func (*GraphBaseServiceClient) Devices ¶ added in v0.41.0

Devices the devices property

func (*GraphBaseServiceClient) DevicesById ¶ added in v0.41.0

DevicesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.devices.item collection

func (*GraphBaseServiceClient) Directory ¶ added in v0.41.0

Directory the directory property

func (*GraphBaseServiceClient) DirectoryObjects ¶ added in v0.41.0

DirectoryObjects the directoryObjects property

func (*GraphBaseServiceClient) DirectoryObjectsById ¶ added in v0.41.0

DirectoryObjectsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.directoryObjects.item collection

func (*GraphBaseServiceClient) DirectoryRoleTemplates ¶ added in v0.41.0

DirectoryRoleTemplates the directoryRoleTemplates property

func (*GraphBaseServiceClient) DirectoryRoleTemplatesById ¶ added in v0.41.0

DirectoryRoleTemplatesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.directoryRoleTemplates.item collection

func (*GraphBaseServiceClient) DirectoryRoles ¶ added in v0.41.0

DirectoryRoles the directoryRoles property

func (*GraphBaseServiceClient) DirectoryRolesById ¶ added in v0.41.0

DirectoryRolesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.directoryRoles.item collection

func (*GraphBaseServiceClient) DomainDnsRecords ¶ added in v0.41.0

DomainDnsRecords the domainDnsRecords property

func (*GraphBaseServiceClient) DomainDnsRecordsById ¶ added in v0.41.0

DomainDnsRecordsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.domainDnsRecords.item collection

func (*GraphBaseServiceClient) Domains ¶ added in v0.41.0

Domains the domains property

func (*GraphBaseServiceClient) DomainsById ¶ added in v0.41.0

DomainsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.domains.item collection

func (*GraphBaseServiceClient) Drive ¶ added in v0.41.0

Drive the drive property

func (*GraphBaseServiceClient) Drives ¶ added in v0.41.0

Drives the drives property

func (*GraphBaseServiceClient) DrivesById ¶ added in v0.41.0

DrivesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.drives.item collection

func (*GraphBaseServiceClient) Education ¶ added in v0.41.0

Education the education property

func (*GraphBaseServiceClient) External ¶ added in v0.41.0

External the external property

func (*GraphBaseServiceClient) GetAdapter ¶ added in v0.41.1

GetAdapter returns the client current adapter, Method should only be called when the user is certain an adapter has been provided

func (*GraphBaseServiceClient) GroupLifecyclePolicies ¶ added in v0.41.0

GroupLifecyclePolicies the groupLifecyclePolicies property

func (*GraphBaseServiceClient) GroupLifecyclePoliciesById ¶ added in v0.41.0

GroupLifecyclePoliciesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.groupLifecyclePolicies.item collection

func (*GraphBaseServiceClient) GroupSettingTemplates ¶ added in v0.41.0

GroupSettingTemplates the groupSettingTemplates property

func (*GraphBaseServiceClient) GroupSettingTemplatesById ¶ added in v0.41.0

GroupSettingTemplatesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.groupSettingTemplates.item collection

func (*GraphBaseServiceClient) GroupSettings ¶ added in v0.41.0

GroupSettings the groupSettings property

func (*GraphBaseServiceClient) GroupSettingsById ¶ added in v0.41.0

GroupSettingsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.groupSettings.item collection

func (*GraphBaseServiceClient) Groups ¶ added in v0.41.0

Groups the groups property

func (*GraphBaseServiceClient) GroupsById ¶ added in v0.41.0

GroupsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.groups.item collection

func (*GraphBaseServiceClient) Identity ¶ added in v0.41.0

Identity the identity property

func (*GraphBaseServiceClient) IdentityGovernance ¶ added in v0.41.0

IdentityGovernance the identityGovernance property

func (*GraphBaseServiceClient) IdentityProtection ¶ added in v0.41.0

IdentityProtection the identityProtection property

func (*GraphBaseServiceClient) IdentityProviders ¶ added in v0.41.0

IdentityProviders the identityProviders property

func (*GraphBaseServiceClient) IdentityProvidersById ¶ added in v0.41.0

IdentityProvidersById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.identityProviders.item collection

func (*GraphBaseServiceClient) InformationProtection ¶ added in v0.41.0

InformationProtection the informationProtection property

func (*GraphBaseServiceClient) Invitations ¶ added in v0.41.0

Invitations the invitations property

func (*GraphBaseServiceClient) InvitationsById ¶ added in v0.41.0

InvitationsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.invitations.item collection

func (*GraphBaseServiceClient) Localizations ¶ added in v0.41.0

Localizations the localizations property

func (*GraphBaseServiceClient) LocalizationsById ¶ added in v0.41.0

LocalizationsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.localizations.item collection

func (*GraphBaseServiceClient) Me ¶ added in v0.41.0

Me the me property

func (*GraphBaseServiceClient) Oauth2PermissionGrants ¶ added in v0.41.0

Oauth2PermissionGrants the oauth2PermissionGrants property

func (*GraphBaseServiceClient) Oauth2PermissionGrantsById ¶ added in v0.41.0

Oauth2PermissionGrantsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.oauth2PermissionGrants.item collection

func (*GraphBaseServiceClient) Organization ¶ added in v0.41.0

Organization the organization property

func (*GraphBaseServiceClient) OrganizationById ¶ added in v0.41.0

OrganizationById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.organization.item collection

func (*GraphBaseServiceClient) PermissionGrants ¶ added in v0.41.0

PermissionGrants the permissionGrants property

func (*GraphBaseServiceClient) PermissionGrantsById ¶ added in v0.41.0

PermissionGrantsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.permissionGrants.item collection

func (*GraphBaseServiceClient) Places ¶ added in v0.41.0

Places the places property

func (*GraphBaseServiceClient) PlacesById ¶ added in v0.41.0

PlacesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.places.item collection

func (*GraphBaseServiceClient) Planner ¶ added in v0.41.0

Planner the planner property

func (*GraphBaseServiceClient) Policies ¶ added in v0.41.0

Policies the policies property

func (*GraphBaseServiceClient) Print ¶ added in v0.41.0

Print the print property

func (*GraphBaseServiceClient) Privacy ¶ added in v0.41.0

Privacy the privacy property

func (*GraphBaseServiceClient) Reports ¶ added in v0.41.0

Reports the reports property

func (*GraphBaseServiceClient) RoleManagement ¶ added in v0.41.0

RoleManagement the roleManagement property

func (*GraphBaseServiceClient) SchemaExtensions ¶ added in v0.41.0

SchemaExtensions the schemaExtensions property

func (*GraphBaseServiceClient) SchemaExtensionsById ¶ added in v0.41.0

SchemaExtensionsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.schemaExtensions.item collection

func (*GraphBaseServiceClient) ScopedRoleMemberships ¶ added in v0.41.0

ScopedRoleMemberships the scopedRoleMemberships property

func (*GraphBaseServiceClient) ScopedRoleMembershipsById ¶ added in v0.41.0

ScopedRoleMembershipsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.scopedRoleMemberships.item collection

func (*GraphBaseServiceClient) Search ¶ added in v0.41.0

Search the search property

func (*GraphBaseServiceClient) Security ¶ added in v0.41.0

Security the security property

func (*GraphBaseServiceClient) ServicePrincipals ¶ added in v0.41.0

ServicePrincipals the servicePrincipals property

func (*GraphBaseServiceClient) ServicePrincipalsById ¶ added in v0.41.0

ServicePrincipalsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.servicePrincipals.item collection

func (*GraphBaseServiceClient) Shares ¶ added in v0.41.0

Shares the shares property

func (*GraphBaseServiceClient) SharesById ¶ added in v0.41.0

SharesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.shares.item collection

func (*GraphBaseServiceClient) Sites ¶ added in v0.41.0

Sites the sites property

func (*GraphBaseServiceClient) SitesById ¶ added in v0.41.0

SitesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.sites.item collection

func (*GraphBaseServiceClient) Solutions ¶ added in v0.41.0

Solutions the solutions property

func (*GraphBaseServiceClient) SubscribedSkus ¶ added in v0.41.0

SubscribedSkus the subscribedSkus property

func (*GraphBaseServiceClient) SubscribedSkusById ¶ added in v0.41.0

SubscribedSkusById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.subscribedSkus.item collection

func (*GraphBaseServiceClient) Subscriptions ¶ added in v0.41.0

Subscriptions the subscriptions property

func (*GraphBaseServiceClient) SubscriptionsById ¶ added in v0.41.0

SubscriptionsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.subscriptions.item collection

func (*GraphBaseServiceClient) Teams ¶ added in v0.41.0

Teams the teams property

func (*GraphBaseServiceClient) TeamsById ¶ added in v0.41.0

TeamsById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.teams.item collection

func (*GraphBaseServiceClient) TeamsTemplates ¶ added in v0.41.0

TeamsTemplates the teamsTemplates property

func (*GraphBaseServiceClient) TeamsTemplatesById ¶ added in v0.41.0

TeamsTemplatesById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.teamsTemplates.item collection

func (*GraphBaseServiceClient) Teamwork ¶ added in v0.41.0

Teamwork the teamwork property

func (*GraphBaseServiceClient) Users ¶ added in v0.41.0

Users the users property

func (*GraphBaseServiceClient) UsersById ¶ added in v0.41.0

UsersById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.users.item collection

func (*GraphBaseServiceClient) Workbooks ¶ added in v0.41.0

Workbooks the workbooks property

func (*GraphBaseServiceClient) WorkbooksById ¶ added in v0.41.0

WorkbooksById gets an item from the github.com/microsoftgraph/msgraph-sdk-go/.workbooks.item collection

type GraphRequestAdapter ¶

type GraphRequestAdapter struct {
	core.GraphRequestAdapterBase
}

GraphRequestAdapter is the core service used by GraphBaseServiceClient to make requests to Microsoft Graph.

func NewGraphRequestAdapter ¶

func NewGraphRequestAdapter(authenticationProvider absauth.AuthenticationProvider) (*GraphRequestAdapter, error)

NewGraphRequestAdapter creates a new GraphRequestAdapter with the given parameters Parameters: authenticationProvider: the provider used to authenticate requests Returns: a new GraphRequestAdapter

func NewGraphRequestAdapterWithParseNodeFactory ¶

func NewGraphRequestAdapterWithParseNodeFactory(authenticationProvider absauth.AuthenticationProvider, parseNodeFactory absser.ParseNodeFactory) (*GraphRequestAdapter, error)

NewGraphRequestAdapterWithParseNodeFactory creates a new GraphRequestAdapter with the given parameters Parameters: authenticationProvider: the provider used to authenticate requests parseNodeFactory: the factory used to create parse nodes Returns: a new GraphRequestAdapter

func NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactory ¶

func NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactory(authenticationProvider absauth.AuthenticationProvider, parseNodeFactory absser.ParseNodeFactory, serializationWriterFactory absser.SerializationWriterFactory) (*GraphRequestAdapter, error)

NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactory creates a new GraphRequestAdapter with the given parameters Parameters: authenticationProvider: the provider used to authenticate requests parseNodeFactory: the factory used to create parse nodes serializationWriterFactory: the factory used to create serialization writers Returns: a new GraphRequestAdapter

func NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactoryAndHttpClient ¶

func NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactoryAndHttpClient(authenticationProvider absauth.AuthenticationProvider, parseNodeFactory absser.ParseNodeFactory, serializationWriterFactory absser.SerializationWriterFactory, httpClient *nethttp.Client) (*GraphRequestAdapter, error)

NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactoryAndHttpClient creates a new GraphRequestAdapter with the given parameters Parameters: authenticationProvider: the provider used to authenticate requests parseNodeFactory: the factory used to create parse nodes serializationWriterFactory: the factory used to create serialization writers httpClient: the client used to send requests Returns: a new GraphRequestAdapter

type GraphServiceClient ¶

type GraphServiceClient struct {
	GraphBaseServiceClient
}

func NewGraphServiceClient ¶

func NewGraphServiceClient(adapter abstractions.RequestAdapter) *GraphServiceClient

func NewGraphServiceClientWithCredentials ¶ added in v0.41.1

func NewGraphServiceClientWithCredentials(credential azcore.TokenCredential, scopes []string) (*GraphServiceClient, error)

NewGraphServiceClientWithCredentials instantiates a new GraphServiceClient with provided credentials and scopes

func NewGraphServiceClientWithCredentialsAndHosts ¶ added in v0.41.1

func NewGraphServiceClientWithCredentialsAndHosts(credential azcore.TokenCredential, scopes []string, validhosts []string) (*GraphServiceClient, error)

NewGraphServiceClientWithCredentialsAndHosts instantiates a new GraphServiceClient with provided credentials , scopes and validhosts

Directories ¶

Path Synopsis
me
me
add

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL