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

    Returns

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

    Throws

    AuthorizationError if the authorization process does not complete successfully.

    Throws

    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.

    • Optional authFlowParams: AuthFlowParams

      Optionally modify the authorization process by providing additional parameters.

    • Optional authWindowOptions: AuthWindowOptions

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

    Returns Promise<Microsoft365Connection>

Generated using TypeDoc