microsoft365

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMSGraphEmailSenderAppAuth

func NewMSGraphEmailSenderAppAuth(clientId, tenantId, clientSecret, user string) (*mSGraphEmailSender, error)

NewMSGraphEmailSenderAppAuth creates a new instance of mSGraphEmailSender with application authentication. It initializes the Microsoft Graph email sender with the provided Azure AD client credentials.

Parameters:

  • clientId: The client ID of the Azure AD application.
  • tenantId: The tenant ID of the Azure AD directory.
  • clientSecret: The client secret of the Azure AD application.
  • user: The user account from where the emails will be sent. Can be a real user or a shared mailbox.

Returns:

  • *mSGraphEmailSender: A pointer to the initialized mSGraphEmailSender.
  • error: An error if the initialization fails, otherwise nil.

func NewMSGraphEmailSenderManagedIdentity

func NewMSGraphEmailSenderManagedIdentity(user string) (*mSGraphEmailSender, error)

NewMSGraphEmailSenderManagedIdentity creates a new instance of mSGraphEmailSender using Managed Identity authentication. It initializes the Microsoft Graph email sender with the provided Azure AD managed identity credentials.

Parameters:

  • user: The user account from where the emails will be sent. Can be a real user or a shared mailbox.

Returns:

  • *mSGraphEmailSender: A pointer to the initialized mSGraphEmailSender.
  • error: An error if the initialization fails, otherwise nil.

func NewMSGraphEmailSenderROPC

func NewMSGraphEmailSenderROPC(clientId, tenantId, username, password string) (*mSGraphEmailSender, error)

NewMSGraphEmailSenderROPC creates a new instance of mSGraphEmailSender using Resource Owner Password Credentials (ROPC) authentication. It initializes the Microsoft Graph email sender with the provided Azure AD client credentials and user credentials.

Parameters:

  • clientId: The client ID of the Azure AD application.
  • tenantId: The tenant ID of the Azure AD directory.
  • username: The username of the user.
  • password: The password of the user.

Returns:

  • *mSGraphEmailSender: A pointer to the initialized mSGraphEmailSender.
  • error: An error if the initialization fails, otherwise nil.

func NewMSGraphEmailSenderUserAuth

func NewMSGraphEmailSenderUserAuth(clientId, tenantId string) (*mSGraphEmailSender, error)

NewMSGraphEmailSenderUserAuth creates a new instance of mSGraphEmailSender with user (delegated) authentication. It initializes the Microsoft Graph email sender with the provided Azure AD client credentials using delegated authentication.

Parameters:

  • clientId: The client ID of the Azure AD application.
  • tenantId: The tenant ID of the Azure AD directory.

Returns:

  • *mSGraphEmailSender: A pointer to the initialized mSGraphEmailSender.
  • error: An error if the initialization fails, otherwise nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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