msgraphclient

package
v0.0.0-...-40910d2 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectoryObject

type DirectoryObject struct {
	Type                 string
	ServicePrincipalType string
	ManagedIdentity      string
	DisplayName          string
	ObjectID             string
	ApplicationID        string
}

type MsGraphClient

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

func NewMsGraphClient

func NewMsGraphClient(cloudConfig cloudconfig.CloudEnvironment, tenantID string, logger *zap.SugaredLogger) *MsGraphClient

NewMsGraphClient creates new MS Graph client

func NewMsGraphClientFromEnvironment

func NewMsGraphClientFromEnvironment(logger *zap.SugaredLogger) (*MsGraphClient, error)

NewMsGraphClientFromEnvironment creates new MS Graph client from environment settings

func NewMsGraphClientWithCloudName

func NewMsGraphClientWithCloudName(cloudName string, tenantID string, logger *zap.SugaredLogger) (*MsGraphClient, error)

NewMsGraphClientWithCloudName creates new MS Graph client with environment name as string

func (*MsGraphClient) GetTenantID

func (c *MsGraphClient) GetTenantID() string

GetTenantID returns the current set TenantID

func (*MsGraphClient) LookupPrincipalID

func (c *MsGraphClient) LookupPrincipalID(ctx context.Context, princpalIds ...string) (map[string]*DirectoryObject, error)

LookupPrincipalID returns information about AzureAD directory object by objectid

func (*MsGraphClient) NewAzCoreClientOptions

func (c *MsGraphClient) NewAzCoreClientOptions() *azcore.ClientOptions

NewAzCoreClientOptions returns new client options for all arm clients

func (*MsGraphClient) RequestAdapter

func (c *MsGraphClient) RequestAdapter() *msgraphsdk.GraphRequestAdapter

RequestAdapter returns msgraph request adapter

func (*MsGraphClient) ServiceClient

func (c *MsGraphClient) ServiceClient() *msgraphsdk.GraphServiceClient

ServiceClient returns msgraph service client

func (*MsGraphClient) SetCacheTtl

func (c *MsGraphClient) SetCacheTtl(ttl time.Duration)

SetCacheTtl set TTL for service discovery cache

func (*MsGraphClient) SetUserAgent

func (c *MsGraphClient) SetUserAgent(useragent string)

SetUserAgent set user agent for all API calls

func (*MsGraphClient) UseAzCliAuth

func (c *MsGraphClient) UseAzCliAuth()

UseAzCliAuth use (force) az cli authentication

Jump to

Keyboard shortcuts

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