Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft Teams notifications not working #207

Closed
Denvek opened this issue Oct 16, 2024 · 3 comments
Closed

Microsoft Teams notifications not working #207

Denvek opened this issue Oct 16, 2024 · 3 comments
Labels
troubleshooting Maybe bug, maybe not

Comments

@Denvek
Copy link

Denvek commented Oct 16, 2024

I've set up Beszel to monitor our servers, and I'm attempting to get the notifications set up to push to a Microsoft Teams webhook, but I'm not receiving the notification. I know that the notifications work, as I am able to successfully receive the email notifications, and also via a Discord webhook. I know that the webhook is set up in Teams correctly as it does receive notifications from other services as expected, but when I set it up in Beszel and click the Test URL button I get the message that the notification has been sent but I don't receive the notification in Teams.

I don't know if the issue itself is with Beszel or Shoutrrr, the only thing I can see is that in the Shoutrrr documentation about how to transate the webhook URL into the Shoutrrr format it gives the Teams webhook URL format as https://organization.webhook.office.com/webhookb2/group@tenant/IncomingWebhook/altId/groupOwner, and the URL I have has another segment after the groupOwner, although it doesn't work if I include or exclude that in the Shoutrrr URL.

@henrygd
Copy link
Owner

henrygd commented Oct 16, 2024

It could have something to do with Teams changing how webhooks work.

There are open issues about it in both the shoutrrr and watchtower repos:

containrrr/shoutrrr#446

containrrr/watchtower#1997

The latter has a workaround using an email address that posts to your channel.

If you want to test with shoutrrr directly, you can download the binary from their releases page and use the CLI with the debug flag:

shoutrrr send -d \
    --url "<SERVICE_URL>" \
    --message "<MESSAGE BODY>"

I don't think there's anything we're doing on this end that would break it, but if the notification works when run directly with shoutrrr, let me know and I'll fix it from there.

@henrygd henrygd added the troubleshooting Maybe bug, maybe not label Oct 16, 2024
@Denvek
Copy link
Author

Denvek commented Oct 17, 2024

It looks like Beszel is fine and this is the issue with shoutrrr - I tested the direct send and that's giving the same result where it says it's successful but Teams doesn't receive the message.

The workaround with the email address works fine - if anyone else needs to do this the steps to follow are:

  1. Right-click on the channel you want the notifications to go to, or left-click the three dots next to the channel name, to get the context menu
  2. Select "Get email address"
  3. Expand out the Advanced settings, and ensure that the sender address you've configured in Beszel is allowed to send to this address
  4. Copy the address Teams provides into the list of emails Beszel sends email notifications to.

@henrygd
Copy link
Owner

henrygd commented Oct 17, 2024

Thanks for the info, I'll point others here if they run into the same problem.

Closing the issue since it's not something I can fix on this side. If shoutrrr devs release a fix I'll make sure it's updated in Beszel.

@henrygd henrygd closed this as completed Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
troubleshooting Maybe bug, maybe not
Projects
None yet
Development

No branches or pull requests

2 participants