[ZBX-19488] Invalid MS Teams webhook Created: 2021 May 29  Updated: 2024 Apr 10  Resolved: 2021 Oct 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: None
Fix Version/s: 6.0 (plan)

Type: Problem report Priority: Major
Reporter: Nguyen Tuan Assignee: Andrew Biba
Resolution: Won't fix Votes: 2
Labels: Teams
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix Server: zabbix_server (Zabbix) 5.2.3 Linux Server


Attachments: PNG File image-2021-05-31-10-58-07-707.png    
Issue Links:
Duplicate
is duplicated by ZBX-18853 Invalid MS Teams webhook because of n... Closed
Team: Team INT
Sprint: Sprint 77 (Jun 2021), Sprint 78 (Jul 2021), Sprint 79 (Aug 2021), Sprint 80 (Sep 2021), Sprint 81 (Oct 2021)
Story Points: 1

 Description   

Steps to reproduce:

  1. Try to follow the guide: Microsoft Teams monitoring and integration with Zabbix
  2. Based on [Use Microsoft 365 and custom connectors - Microsoft Teams | Microsoft Docs|https://docs.microsoft.com/en-us/microsoftteams/office-365-custom-connectors#add-a-connector-to-a-channel] we get a new webhook URL: https://companyname.webhook.office.com/webhookb2/5bf015e2-ce92-42a8-8e90-92552d6ef161@0c6aa5a3-6531-4e28-9c0b-33ba1a8aa1ff/IncomingWebhook/f7fb2308e5f14431ace5b7cd0e670e42/4563618c-b03b-4e80-b093-28bb4ff11de8
  3. On Zabbix Server add new Media Type Webhook with Paraemter teams_endpoint set to the URL
  4. If you try to test the new media type you get the following message in webinterface: Sending failed: Invalid MS Teams webhook URL: https://<MSTENTANT>.webhook.office.com/webhookb2/586d2828-cb58-48f6-954d-d5de26c29795@0c6aa5a3-6531-4e28-9c0b-33ba1a8aa1ff/IncomingWebhook/bb06d61118274b82bfe4d9<TenRandomDigits>/4563618c-b03b-4e80-b093-28bb4ff11de8
  5. Edited the file media_msteams.xml 
Old New
else if (!params.teams_endpoint.startsWith('https://outlook.office.com/webhook/')) {
throw 'Invalid MS Teams webhook URL: ' + params.teams_endpoint;
else if (!params.teams_endpoint.startsWith('outlook.office.com/webhook/')) {
throw 'Invalid MS Teams webhook URL: ' + params.teams_endpoint;

After editing is done, import the file again. But the problem is still unresolved,

Result:
Unable to send messages to Teams:
Sending failed: Invalid MS Teams webhook URL
Expected:
Send Messages to Teams



 Comments   
Comment by Tikhon Uskov (Inactive) [ 2021 May 31 ]

tuantlu26 we don't check Teams URL since January 2021.

Please update your webhook from our git.

Comment by Nguyen Tuan [ 2021 May 31 ]

after importing your file i have restarted service zabbix_server but when i test again with mediatype it still gives the same error. what should I do ?

Comment by Phil [ 2021 Jun 02 ]

Same issue on 5.0.12. Latest version and latest mediatype xml file. still getting

 

[ MS Teams Webhook ] ERROR: Invalid MS Teams webhook URL:

Comment by Edward Anthony G. Cudilla [ 2021 Aug 11 ]

Is there any fix? still persist in 5.0.14... =(

Comment by Andrew Biba [ 2021 Oct 04 ]

Tested on Zabbix 5.0.15 and 5.4.5 and no issues are revealed.
I suggest remove and reinstall the latest template file and check (recreate) MS Teams connector webhook because my webhook URL format looks different from the URL in the issue description.

Comment by Ong Zhi Huang [ 2021 Oct 06 ]

Same with @andrew .

I'm on Zabbix 5.4.3, replaced with the JavaScript on the template, and it's working again.

 

 

Generated at Sun May 11 08:06:08 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.