Receiving flag change notifications in Microsoft Teams
Read time: 3 minutes
Last edited: Aug 22, 2024
Overview
This topic explains how to receive notifications in Microsoft Teams when someone changes a feature flag that you have subscribed to notifications for.
To use this feature, you must have installed and configured the LaunchDarkly Microsoft Teams app. To learn more, read Setting up the Microsoft Teams app.
Subscribe to flag notifications
You can subscribe to updates for flags, segments, metrics, projects, or environments. When someone updates a resource LaunchDarkly sends a notification of the change to all channels subscribed to updates for that resource.
There are two ways to subscribe to flag notifications:
- Follow a specific flag in LaunchDarkly. To learn more, read Follow flags.
- Create a subscription in Microsoft Teams.
Create a subscription in Microsoft Teams
You can create a subscription using the subscribe
command with keyword arguments, or using the subscribe
command with positional arguments. We recommend using keyword arguments. To view more information and examples of the subscribe command, run @launchdarkly help subscribe
in a channel or direct message that the LaunchDarkly bot is in.
Subscribe with keyword arguments
You can use keyword arguments to create a subscription with any combination of parameters. At least one parameter is required.
Here's how:
- Open the Microsoft Teams channel you want notifications in.
- Run
@launchdarkly subscribe
and pass in any combination of the following arguments:-p
or--project=
-e
or--environment=
-f
or--flag_key=
-s
or--status=
-a
or--action=
-t
or--tag=
- Press Enter.
For example, the following command creates a subscription for all flags in the qa
environment of the chatbot
project, with status active
and tag production
:
Subscribe with positional arguments
You can use positional arguments to create a subscription for a single flag. You must provide all three arguments.
Here's how:
- Open the Microsoft Teams channel you want notifications in.
- Run
@launchdarkly subscribe
and provide in order the project, environment, and flag key of the flag you would like to subscribe to. - Press Enter.
For example, the following command creates a subscription for the chat-response
flag in the qa
environment of the chatbot
project:
Manage subscriptions
You can view and remove subscriptions in a Teams channel using the @launchdarkly list
command:
- Open the Teams channel where you would like to remove notifications.
- Type
@launchdarkly list
and press Enter. A list of subscriptions for the channel appears. - Locate the subscription you wish to remove from the channel.
- Click Delete.
View flag change notifications in Microsoft Teams
Flag change notifications appear in the Microsoft Teams app.
Here's how to view them:
- In Microsoft Teams, open a chat window with LaunchDarkly.
- Click the flag name after "Feature flag:" to open the flag in LaunchDarkly.
- Click View flag details to view more information about the flag.
- Click Unfollow changes to stop receiving notifications for the flag. This will also unfollow the flag in LaunchDarkly.