The Matomo Microsoft Teams plugin lets you deliver reports directly to Microsoft Teams where your team can receive regular analytics updates. This feature is available in Matomo Cloud for configuration and On-Premise users can install it from the Matomo Marketplace.

The guide explains how to obtain the Microsoft Teams Client Id, Client Secret, Tenant ID and Teams ID for Matomo integration.

1: Get the Client ID, Tenant ID and Client Secret

  1. Open your Microsoft Azure Portal and click Microsoft Entra ID.

  2. Navigate to Manage > App registrations in the left menu and click New registration.

  3. Set the name of app, for example “Matomo Teams Integration” and click Register.

  4. Go to Manage > Certifications & secrets in the left menu.

  5. Click New client secret and provide a description, for example “Matomo Teams Integration Secret”. Set the expires to 730 days (24 months) and click Add. Copy and store the Secret Value.

  6. Go to Manage > API permissions in the left menu and click Add a permission.

  7. Click Microsoft Graph and then Application permissions.

  8. To send the reports to Microsoft Teams Channel, Matomo requires Files.ReadWrite.All, Group.ReadWrite.All and Sites.ReadWrite.All API permission. Note: This permission would need to be approved by your Admin, check the Status column.

  9. Click Overview in the left menu and copy and save the Client ID and Tenant ID.

2: Get the Teams ID

  1. Open Microsoft Teams in a browser.
  2. Go to the target teams channel.
  3. Click the ellipsis icon () and select Copy Link” and look for groupId=

Example:

UR:https://teams.microsoft.com/l/team/19%3Axyz@thread.tacv2/conversations?groupId=12345678-aaaa-bbbb-cccc-123456789abc&tenantId=tenantID

groupID=12345678-aaaa-bbbb-cccc-123456789abc

3: Set up Microsoft Teams in Matomo

  1. In Matomo, navigate to Administration Settings Cog Icon > System > General settings > Microsoft Teams.
  2. Enter the Client ID, Client Secret, Tenant ID and Teams ID obtained from Step 1 & 2 in the fields provided.
  3. Save your settings.
Previous FAQ: How to get Microsoft Teams Webhook URL