AboutSupportDeveloper GuideVersion 1.1.0

Retrieves a connection to a Microsoft 365 tenant, assuming the user is currently authenticated to Salesforce and the registered application has been previously authorized.

Unlike connect, if a connection could not be established because the user is not authenticated to Microsoft 365 or the registered application has not been authorized, the function simply returns null and does not throw an error.

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.

    Returns Promise<null | Microsoft365Connection>

    A connection, or null if the user is not authenticated to Microsoft 365 or the registered application has not been authorized.