Updates to the change log to address build times.
This commit is contained in:
parent
58ad917d4c
commit
0a111cd9df
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- Check if the user specified for an exchange backup operation has a mailbox.
|
||||
|
||||
### Changed
|
||||
|
||||
- Beta Libraries are included in package. This can lead to long build times.
|
||||
|
||||
|
||||
## [v0.1.0] (alpha) - 2023-01-13
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ import (
|
||||
az "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||
ka "github.com/microsoft/kiota-authentication-azure-go"
|
||||
khttp "github.com/microsoft/kiota-http-go"
|
||||
beta "github.com/microsoftgraph/msgraph-beta-sdk-go"
|
||||
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
|
||||
msgraphgocore "github.com/microsoftgraph/msgraph-sdk-go-core"
|
||||
"github.com/pkg/errors"
|
||||
@ -46,6 +47,25 @@ func CreateAdapter(tenant, client, secret string) (*msgraphsdk.GraphRequestAdapt
|
||||
auth, nil, nil, httpClient)
|
||||
}
|
||||
|
||||
// CreateBetaAdapter uses the provided credentials with the Kiota Azure Libraries.
|
||||
// Used to access msgraph-beta-sdk-go specific functionality
|
||||
func CreateBetaAdapter(tenant, client, secret string) (*beta.GraphRequestAdapter, error) {
|
||||
cred, err := az.NewClientSecretCredential(tenant, client, secret, nil)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "creating beta m365 client credentials")
|
||||
}
|
||||
|
||||
auth, err := ka.NewAzureIdentityAuthenticationProviderWithScopes(
|
||||
cred,
|
||||
[]string{"https://graph.microsoft.com/.default"},
|
||||
)
|
||||
|
||||
httpClient := CreateHTTPClient()
|
||||
|
||||
return beta.NewGraphRequestAdapterWithParseNodeFactoryAndSerializationWriterFactoryAndHttpClient(
|
||||
auth, nil, nil, httpClient)
|
||||
}
|
||||
|
||||
// CreateHTTPClient creates the httpClient with middlewares and timeout configured
|
||||
func CreateHTTPClient() *http.Client {
|
||||
clientOptions := msgraphsdk.GetDefaultClientOptions()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user