Skip to content

Teams Integration with Alerting

Microsoft Teams supports various functionalities, including alerting. Using the Microsoft Graph API, you can integrate Teams-based alerting directly into your workflows, applications, or services. This guide explains how to register an application, configure the necessary permissions, and implement alerting.

Registering the application

To interact with the Microsoft Graph API, you need to register an application in Azure Active Directory.

1. Log in to the Azure Portal with administrative access.

2. Navigate to Azure Active Directory > App registrations > New registration.

Screenshot

3. Provide the following details:

  • Name: Enter a descriptive name for your application.
  • Supported account types: Select Accounts in this organizational directory only.
  • Redirect URI: This is optional for now and can be added later.

4. Click Register.

Tip

For more details, refer to the official documentation: https://learn.microsoft.com/en-us/graph/auth-register-app-v2

Screenshot

  • After registration, you will be redirected to the application overview page.
  • Note down the Client ID and Tenant ID from the overview page.

Screenshot

  • Use the Client ID and Tenant ID in the Scheduler service settings.

Authentication

  • Navigate to the Authentication section. A popup will appear with options for Web applications and Mobile/Desktop applications.
  • Select Web under Web applications.

Screenshot

  • On the next page, enter the following URL in the Web Redirect URL field:
    http://localhost:<Scheduler_port>/teams/auth/callback
  • Click Save.

Screenshot

Generating a Client Secret

  • Go to the Certificates & Secrets section and click Client Secrets.
  • Click New client secret to open the left-side panel.

Screenshot

  • Provide a description for the key and select an expiration period (maximum of 2 years).
  • Click Add.

Screenshot

  • Copy the generated client secret and use it in the Scheduler service settings.

Configuring API Permissions

  • Navigate to the API Permissions section and click Add a permission.
  • Select Microsoft APIs from the left-side panel.
  • Choose Microsoft Graph to access Teams-related permissions.

Screenshot

  • Under Microsoft Graph, select Delegated permissions.

Screenshot

  • Select the required permissions for Teams integration with alerting.

Screenshot

  • Ensure the following permissions are enabled for Teams configuration.

Screenshot