AboutSupportDeveloper GuideVersion 14.0.22

The Microsoft365WorkflowIntegration class is a WorkflowIntegration that provides Microsoft 365 integration. This integration allows you to search for Microsoft 365 entities and perform actions on them using Home.

Hierarchy

  • BaseWorkflowIntegration
    • Microsoft365WorkflowIntegration

Implements

Constructors

  • Creates an instance of Microsoft365WorkflowIntegration.

    Parameters

    Returns Microsoft365WorkflowIntegration

    Example

    const microsoft365Integration = new Microsoft365WorkflowIntegration({
    connect: {
    clientId: microsoft365Config.clientId, // Client ID of the registered app
    tenantId: microsoft365Config.tenantId, // Tenant ID of the registered app
    redirectUri: microsoft365Config.redirectUri // Redirect URI of the registered app. This _must_ be the same domain as the app (providerUrl).
    },
    });

    await WorkspacePlatform.init({
    browserOptions: {},
    integrations: [microsoft365Integration]
    })

Properties

The configuration object for the integration.

workflowIntegrationName: string = 'Microsoft 365'

The name of the integration. Used for Analytics

Methods

  • Connects to the Microsoft 365 API using the provided configuration.

    Parameters

    Returns Promise<void>

    Example

    await microsoft365Integration.connect({
    clientId: microsoft365Config.clientId,
    tenantId: microsoft365Config.tenantId,
    redirectUri: microsoft365Config.redirectUri
    });
  • Initializes a given workflow.

    This method is automatically called when disableAutoInitialize is set to false in the workflow configuration.

    Use this method if you need to call it manually (not at platform initialization).

    Parameters

    • workflow: string

      The workflow to initialize.

    Returns Promise<void>

    Example

    const microsoft365WorkflowIntegration = new Microsoft365WorkflowIntegration({
    connect: {
    clientId: microsoft365Config.clientId,
    tenantId: microsoft365Config.tenantId,
    redirectUri: microsoft365Config.redirectUri
    },
    workflows: {
    search: {
    disableAutoInitialize: true
    }
    }
    });

    await platformInit({
    overrideCallback,
    browserOptions: {},
    integrations: [microsoft365WorkflowIntegration]
    });

    await microsoft365WorkflowIntegration.initializeWorkflow('search');