Skip to content

Instantly share code, notes, and snippets.

@baywet
Created November 18, 2021 21:02
Show Gist options
  • Save baywet/d68c9b29bdf407770e48178ccf2f2a3b to your computer and use it in GitHub Desktop.
Save baywet/d68c9b29bdf407770e48178ccf2f2a3b to your computer and use it in GitHub Desktop.
ms graph go beta sdk
import (
azidentity "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
a "github.com/microsoft/kiota/authentication/go/azure"
"context"
// this line imports the v1.0 SDK
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
// this line imports the beta SDK
msgraphbetasdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
)
// … creation of the credentials, authentication provider and request adapter omitted for brievety
// creates a client for the v1.0 API
client := msgraphsdk.NewGraphServiceClient(adapter)
// creates a client for the beta API
betaclient := msgraphbetasdk.NewGraphServiceClient(adapter)
// use the clients as needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment