Configuring Microsoft Teams alerts
This guide provides the steps to configure Microsoft Teams chats and channels to receive alerts from the Posture Management service.
There are two different configuration flows available:
- General Flow: Available for both free and premium Microsoft Teams subscriptions.
- Light Flow: Available exclusively for Microsoft Teams Premium subscription.
General Flow
- Log in to Power Automate https://make.powerautomate.com/ under your Microsoft 365 account with a Teams subscription.
- Click My flows -> New flow
- From the New flow drop-down menu, select the Instant cloud flow option
- In the opened Build an instant cloud flow modal window enter a flow name, e.g., "Posture Management Alerts"
- From the Choose how to trigger this flow list, select the When a Teams webhook request is received option and then click the Create button
- In the opened window, select the When a Teams webhook request is received block
- In the Who can trigger the flow? drop-down list, select the Anyone value
- Click the “+” button -> Add an action
- In the Search field of the opened Add an Action panel, enter the "parse JSON" text and select the Parse JSON option under the Data Operation app
- In the opened Parse JSON panel, place the cursor in the Content field and click the lightning bolt icon
- Select the Body variable
- Copy and paste the following JSON in the Schema field
{
"type": "object",
"properties": {
"dynamicMessage": {
"type": "string"
}
}
}
- Under the Parse JSON option, click the “+” button -> Add an action
- In the Search field of the opened Add an Action panel, enter the "Post a message in a chat or channel" text and select the corresponding option under the Microsoft Teams app
In the opened Post message in a chat or channel panel, select the following values
- Post As: User
- Post In: according to your preferences (Channel or Group chat)
- Team: enter your MS Team name (if the Channel value is selected in the Post In field)
- Channel/Group Chart: enter your MS Teams Channel or Group chat
- Place the cursor in the Message field and click the lightning bolt icon
- Select the Body dynamicMessage variable
- Click the Save button
- Click the Flow checker button and review warnings and errors. If any warning or error exists, fix it before proceeding
- Select the When a Teams webhook request is received block and copy the HTTP URL, which was automatically generated after configuration
- Open the Posture Management dashboard and navigate to Alerts -> Add (+)
- In the Add Alert dialog, enter an alert name, description, select the status and risk level associated with the alert and then toggle Microsoft Teams on and press add (+)
- Enter/paste the URL copied from step 19 into the channel text box.
The alert is now configured.
Light Flow
- Log in to Power Automate https://make.powerautomate.com/ under your Microsoft 365 account with a Teams subscription.
- Click My flows -> New flow
- From the New flow drop-down menu, select the Instant cloud flow option
- In the opened Build an instant cloud flow modal window enter a flow name, e.g., "Posture Management Alerts"
- From the Choose how to trigger this flow list, select the When an HTTP request is received option and then click the Create button
- In the opened window, select the Manual block
- In the Who can trigger the flow? drop-down list, select the Anyone value
- Copy and paste the following JSON in the Request Body JSON Schema field
{
"type": "object",
"properties": {
"dynamicMessage": {
"type": "string"
}
}
}
- Click the “+” button under the Manual block -> Add an action
- In the Search field of the opened Add an Action panel, enter the "Post a message in a chat or channel" text and select the corresponding option under the Microsoft Teams app
- In the opened Post message in a chat or channel panel, select the following values:
- Post As: User
- Post In: according to your preferences (Channel or Group chat)
- Team: enter your MS Team name (if the Channel value is selected in the Post In field)
- Channel/Group Chart: enter your MS Teams Channel or Group chat
- Place the cursor in the Message field and click the lightning bolt icon
- Select the dynamicMessage variable
- Click the Save button
- Click the Flow checker button and review warnings and errors. If any warning or error exists, fix it before proceeding
- Select the Manual block and copy the HTTP URL, which was automatically generated after configuration
- Open the Posture Management dashboard and navigate to Alerts -> Add (+)
- In the Add Alert dialog, enter an alert name, description, select the status and risk level associated with the alert and then toggle Microsoft Teams on and press add (+)
- Enter/paste the URL copied from step 19 into the channel text box.
The alert is now configured.