Skip to content

Commit

Permalink
Add troubleshooting info from @AdamVB (#509)
Browse files Browse the repository at this point in the history
* Add troubleshooting info from @AdamVB

* fix tag issue
  • Loading branch information
misterpantz authored Dec 18, 2024
1 parent 55fd3c9 commit 31e0e00
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/platform/maintain/alerting/msteams.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,32 @@ import Partial from "../../partials/\_editor-owner.mdx";

6. Select the **SAVE** button.

## Troubleshoot Microsoft Teams alerting

### Send a test alert to Microsoft Teams

If you don't successfully receive alerts in Microsoft Teams, you can test the webhook by sending a webhook payload to the endpoint. Open a shell and enter this command. For `WEBHOOK_URL`, substitute the URL you copied in Microsoft Teams:

```bash
curl -vH "Content-Type: application/json" -d '{ "type": "message", "attachments": [ { "contentType": "application/vnd.microsoft.card.adaptive", "contentUrl": null, "content": { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.2", "body": [ { "type": "TextBlock", "text": "Hello World, this is a Mondoo Test!" } ] } } ] }' "WEBHOOK_URL"
```

### Error messages in Microsoft Power Automate

When checking the event runs in [Power Automate](https://make.powerautomate.com/), you may see error messages like "The bot is not part of the conversation roster." This can occur if the channel to which you're trying to post Mondoo alerts is private. The Workflow app relies on a service principal (called Flow Bot) that is not allowed to join private channels.

There are two solutions:

- The simplest solution is to send Mondoo alerts to a public channel.

- If you need to send Mondoo alerts to a private channel, you can change the Workflow flow to post alerts as a certain user:

1. Log into Microsoft Power Automate as the user you want to post Mondoo alerts.

2. In the left navigation, select **My flows**.

3. Open the flow you created in the [steps above](#create-a-webhook-in-microsoft-teams).

4. Change the last step in the flow (send adaptive card) to send the message as **User** instead of **Flow Bot**.

---

0 comments on commit 31e0e00

Please sign in to comment.