Microsoft Teams

Download 26
Last updated Nov 28, 2025

Install Guide

Note
This guide was written as of 2026-08-25. The Microsoft Teams screens and menu labels may change afterwards.

Overview

Microsoft Teams is the collaboration platform included in Microsoft 365. It provides a workflow feature that posts incoming webhook requests to a team channel. Logpresso uses the Microsoft Teams app to send alerts and monitoring results to Teams channels.

This app does not collect logs. It only sends messages: register the workflow webhook URL issued by Teams in a connect profile, then send messages with the ms-teams-send and ms-teams-send-batch query commands.

Scope

Note
Works on Sonar 4.0.2312.0 with Microsoft Teams (Microsoft 365). A Microsoft 365 license that allows the Workflows feature is required.

Requirements

ItemRequirementNote
Teams account permissionPermission to add a workflow to the target channel (team owner or member)Without it, workflow creation is blocked
Channel typeStandard channelPrivate channels cannot be used for webhook workflows
Credential to issueWorkflow webhook URLIssued once when the Teams workflow is created
Network accessHTTPS/443 (Sonar to the workflow webhook host, outbound)A proxy is required in closed networks

Configure Microsoft Teams

Go to Microsoft Teams and sign in with the account that will create the workflow.

Microsoft Teams home screen

Step 1: Create a team and channel

Note
Skip this step if you already have a team and a standard channel to use.
  1. Click Chat on the left, then click New item above the chat and channel list and select New team.

    Select New team from the New item menu

  2. In the Create your team dialog, enter Team name, Team type, and First channel name, then click Create.

    Enter team name and first channel name

  3. Add members to the team if needed. Click Skip to add them later.

    Add members to the team

  4. Confirm the created team and channel under Teams and channels on the left.

    Confirm the created team and channel

Step 2: Issue a workflow webhook URL

Note
Skip this step and use the existing webhook URL if you already have a workflow to use.
  1. Click More options (...) next to the channel where you want to create the workflow, then select Workflows.

    Select Workflows from the channel More options menu

  2. In the Workflows pane, click View templates.

    Click View templates in the Workflows pane

  3. Select the Post to a channel when a webhook request is received template. Type "webhook" in the search box to find it quickly.

    Select the webhook alert template

  4. Under Parameters, select the Team the channel is in and the Channel, then click Save.

    Select the team and channel in workflow parameters

  5. On the workflow screen, click Copy Webhook link and keep the URL in a safe place. You need this URL when configuring the Logpresso connect profile.

    Copy the webhook link after the workflow is created

Caution
The webhook URL contains an authentication token. Anyone who obtains it can post messages to the channel, so store it in a secure location.

Configure Logpresso

Add a connect profile

Go to System > Connect Profile, click Add, and enter the values below.

Add connect profile screen

TypeItemSetting
RequiredNameA unique name that identifies the connect profile
RequiredIdentifierA unique identifier used in Logpresso queries. For example, ms_teams
RequiredTypeSelect Microsoft Teams Workflows
RequiredWorkflowsPaste the workflow webhook URL copied in the previous step
OptionalConnect timeoutIn seconds. 30 by default
OptionalRead timeoutIn seconds. 60 by default
OptionalHTTP proxyIP:port format, for closed networks that require a proxy
Tip
To integrate two or more channels, enter each channel webhook URL in the Workflows field separated by commas. A single command run sends the same message to every registered channel.

After filling in the required fields, click Save to add the connect profile.

Post-installation Verification

Run the query below to confirm that message delivery works. Replace the profile value with the identifier of the connect profile you registered.

ms-teams-send profile=ms_teams subject="Test subject" text="Test message body."
  • Success: the query returns a record with the profile, subject, and text fields, and a card message is posted to the connected Teams channel as shown below.
  • Failure: recheck the workflow URL in the connect profile, whether the Teams workflow is active, and network reachability (HTTPS/443).

Test message posted to the Teams channel

To send multiple search results at once, use the ms-teams-send-batch command. See the query command manuals for the options of each command.

References