Configuring Microsoft Teams alerts

Updated 2 months ago by admin

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:

  1. General Flow: Available for both free and premium Microsoft Teams subscriptions.
  2. Light Flow: Available exclusively for Microsoft Teams Premium subscription.

General Flow

  1. Log in to Power Automate https://make.powerautomate.com/ under your Microsoft 365 account with a Teams subscription.
  2. Click My flows -> New flow
  3. From the New flow drop-down menu, select the Instant cloud flow option
  4. In the opened Build an instant cloud flow modal window enter a flow name, e.g., "Posture Management Alerts"
  5. 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
  6. In the opened window, select the When a Teams webhook request is received block
  7. In the Who can trigger the flow? drop-down list, select the Anyone value
  8. Click the “+” button -> Add an action
  9. 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
  10. In the opened Parse JSON panel, place the cursor in the Content field and click the lightning bolt icon
  11. Select the Body variable
  12. Copy and paste the following JSON in the Schema field
{
"type": "object",
"properties": {
"dynamicMessage": {
"type": "string"
}
}
}
  1. Under the Parse JSON option, click the “+” button -> Add an action
  2. 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
Currently, the Posture Managements service does not support the Flow Bot approach for MS Teams alerts, so, if you select this option, errors may occur.
KNOWN ISSUE: The Sender icon of the MS Team post cannot be customised.
  1. Place the cursor in the Message field and click the lightning bolt icon
  2. Select the Body dynamicMessage variable
  3. Click the Save button
  4. Click the Flow checker button and review warnings and errors. If any warning or error exists, fix it before proceeding
  5. Select the When a Teams webhook request is received block and copy the HTTP URL, which was automatically generated after configuration
This HTTP URL will be needed to create the MS Teams alert channel in the Posture Management service
  1. Open the Posture Management dashboard and navigate to Alerts -> Add (+)
  2. 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 (+)
  3. Enter/paste the URL copied from step 19 into the channel text box.

The alert is now configured.

Light Flow

  1. Log in to Power Automate https://make.powerautomate.com/ under your Microsoft 365 account with a Teams subscription.
  2. Click My flows -> New flow
  3. From the New flow drop-down menu, select the Instant cloud flow option
  4. In the opened Build an instant cloud flow modal window enter a flow name, e.g., "Posture Management Alerts"
  5. From the Choose how to trigger this flow list, select the When an HTTP request is received option and then click the Create button
  6. In the opened window, select the Manual block
  7. In the Who can trigger the flow? drop-down list, select the Anyone value
  8. Copy and paste the following JSON in the Request Body JSON Schema field
{
"type": "object",
"properties": {
"dynamicMessage": {
"type": "string"
}
}
}
  1. Click the “+” button under the Manual block -> Add an action
  2. 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
  3. 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
Currently, the Posture Managements service does not support the Flow Bot approach for MS Teams alerts, so, if you select this option, errors may occur.
KNOWN ISSUE: The Sender icon of the MS Team post cannot be customised
  1. Place the cursor in the Message field and click the lightning bolt icon
  2. Select the dynamicMessage variable
  3. Click the Save button
  4. Click the Flow checker button and review warnings and errors. If any warning or error exists, fix it before proceeding
  5. Select the Manual block and copy the HTTP URL, which was automatically generated after configuration
This HTTP URL will be needed to create the MS Teams alert channel in the Posture Management service.
  1. Open the Posture Management dashboard and navigate to Alerts -> Add (+)
  2. 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 (+)
  3. Enter/paste the URL copied from step 19 into the channel text box.

The alert is now configured.


How did we do?