AboutSupportDeveloper GuideVersion 1.1.0

Initiates the OAuth 2.0 authorization code flow and establishes a connection with a Microsoft 365 tenant. Requires that an app has been registered with Azure AD.

AuthorizationError if the authorization process does not complete successfully.

ParameterError if invalid function parameter values are detected.

  • Parameters

    • clientId: string

      The ID of the registered app to use for authorization.

    • tenantId: string

      The ID of the Azure AD tenant where the app has been registered.

    • redirectUri: string

      The redirect URI value specified in the registered app’s configuration.

    • permissions: string[] = []

      Provide any additional Graph permissions that may be required by your app.

    • OptionalauthFlowParams: AuthFlowParams

      Optionally modify the authorization process by providing additional parameters.

    • OptionalauthWindowOptions: AuthWindowOptions

      Optionally change the appearance and behavior of the authorization popup window by specifying additional options.

    • OptionaluseCurrentWindowForAuthFlow: boolean

      Optionally use the current window for the authorization flow instead of opening a new window.

    Returns Promise<Microsoft365Connection>

    A connection which can be used to execute requests against the Microsoft Graph API.