Send Teams messages with the Teams activity

The Teams activity in Data Factory for Microsoft Fabric lets you send messages to Teams channels or group chats. You can customize messages with dynamic expressions to include information from your pipeline.

Prerequisites

Add Teams activity to a pipeline

To integrate Teams messaging into your pipeline, you need to add the Teams activity. This section guides you through the steps to include and configure the Teams activity in your pipeline.

  1. Create a new pipeline in your workspace.

  2. In the Activities pane, search for Teams and select it to add it to the pipeline canvas.

    Screenshot of the Fabric UI with the Activities pane and Teams activity highlighted.

  3. Select the new Teams activity on the canvas.

    Screenshot showing the General settings tab of the Teams activity.

For details about the General settings tab, see General settings.

Configure Teams activity settings

Set up the Teams activity by following these steps:

  1. Add a connection to your Teams activity. You can create a new connection or use an existing one.

    Note

    • If you're using user authentication and deploying the pipeline with the Teams activity to another workspace, the activity will be inactive until you create a new user authentication connection in the target workspace.
    • If you don't have access to the connections used in the Teams activity, the initial deployment will fail. To troubleshoot, you can edit the target pipeline and change the authorization or set the activity to inactive.

    Screenshot showing the Settings tab of the Teams activity highlighting where to create a new connection or use an existing connection.

  2. Choose where to post the message using the Post in setting. You can post to a channel or a group chat.

    Screenshot showing the Settings tab of the Teams activity highlighting where to select posting to a channel or group chat.

  3. If you select group chat, use the dropdown to pick a group chat you're part of. If you select channel, choose a team and then a channel from the dropdowns.

  4. Write your message in the Message area. Use dynamic expressions to include system or user variables, expressions, or functions. Select View in expression builder to add dynamic expressions.

    Screenshot showing the Settings tab of the Teams activity highlighting the link to select to use dynamic expressions.

  5. If you're posting to a channel, you can add a subject for the message in the Subject text box.

    Screenshot showing the Settings tab of the Teams activity highlighting boxes to add the subject.

Known limitations

  • The Teams activity will be inactive when using CI/CD.

Connection authentication and ownership

The Microsoft Teams activity uses user-based authentication. Each Teams connection is associated with the identity and authentication token of the user who created it.

The following considerations apply when configuring Teams connections:

  • User-specific connections: Each user who wants to run a pipeline that sends Teams messages must create and authenticate their own Teams connection.
  • Connection sharing: Teams connections can't be shared across users. Creating a connection by using an administrator account doesn't allow other users to reuse it.
  • Workspace configuration: When deploying pipelines across workspaces, ensure that the appropriate Teams connection is configured and authenticated for the user running the pipeline.
  • Production environments: Teams activity requires user authentication and doesn't currently support service principal (SPN) or workspace identity (WI) authentication. Production pipelines that use Teams activity must therefore rely on a user-authenticated connection.

Note

Teams connections are tied to the authenticated user's identity, regardless of whether the account has administrator privileges. For production scenarios, consider your organization's identity management and governance requirements when determining which account will create and maintain the connection.