[ZBX-18853] Invalid MS Teams webhook because of new URL synatx Created: 2021 Jan 08 Updated: 2024 Apr 10 Resolved: 2021 Jan 19 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 5.0.7, 5.2.3 |
Fix Version/s: | 5.0.8rc1, 5.2.4rc1, 5.4.0alpha1, 5.4 (plan) |
Type: | Problem report | Priority: | Trivial |
Reporter: | Michael Weber | Assignee: | Tikhon Uskov (Inactive) |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Zabbix Server: zabbix_server (Zabbix) 5.2.3 |
Issue Links: |
|
||||||||
Team: | |||||||||
Sprint: | Sprint 72 (Jan 2021) | ||||||||
Story Points: | 0.25 |
Description |
Steps to reproduce:
Result: Unable to send messages to Teams: Expected: Zabbix Forum Link with fix: Fix:
|
Comments |
Comment by Michael Weber [ 2021 Jan 08 ] |
Sorry, i screwed it up (saved and cant find the "edit" button for the reported issue). So i add the "Fix" sections here: Here the "full" Fix that is working for me: Files:
Modify the
!params.teams_endpoint.startsWith(''https://outlook.office.com/webhook/'')
to
!params.teams_endpoint.includes('office.com/webhook'))
If you dont like "incldues" function for JS we could use the "indexOf". For my setup i used "includes" and the old + new webhook URL syntax is working now! Old Syntax: https://outlook.office.com/webhook/ "New" Syntax: https://<companyname.webhook.office.com/webhookb2/ |
Comment by Alexey Pustovalov [ 2021 Jan 11 ] |
Hello Michael, So Microsoft Teams changed URL from https://outlook.office.com/webhook/ to https://<companyname.webhook.office.com/webhookb2/? |
Comment by Tikhon Uskov (Inactive) [ 2021 Jan 14 ] |
Available in:
|
Comment by Marina Generalova [ 2021 Jan 19 ] |
Documentation updated: |
Comment by Roland Anderson [ 2021 Mar 12 ] |
I'm still running into this issue in 5.2.5. Do I need to do something more than update from the packages?
Edit: need to make the change in the media type script. Oops. |
Comment by Michael Weber [ 2021 Mar 12 ] |
Hi @Tikhon, i am really sorry, i missed to answer your question. We habe some URLs with the "old" syntax https://outlook.office.com/webhook/ and some with the new https//<tentant/company>.webhook.office.com/webhookb2/ , correct. In the Microsoft Teams webhook, hardcoded teams_endpoint check has been removed to prevent URL syntax error.
Best regards and thank you for you help! |
Comment by Henrik Aronsson [ 2021 Apr 14 ] |
Just updated from zabbix-server 5.0.4 to zabbix-server 5.2.6 and this issue is still present. Do we need to run some manual change for this? FYI: The update from Microsoft is schedule to EOL "old" formats as of 2021-04-11, info from MS:
https://admin.microsoft.com/AdminPortal/Home?#/MessageCenter/:/messages/MC234048
Old formats are still working though, but I guess we can expect them to stop working pretty soon.
|
Comment by Vrajesh Mani Raja [ 2021 Apr 19 ] |
Hi everyone! I'm not a Zabbix user but i am facing a similar problem regarding webhooks from the incoming webhook app on MS Teams. Just like Henrik said the old formats stopped working for us last week. What surprised me was that even the new links with the new format <companyname.webhook.office.com> were not working for us. Are the new links working for you guys? Any amount of googling has not helped me find answers. So i thought id reach out to you guys even if its not strictly the same case. Kind Regards. |
Comment by Tikhon Uskov (Inactive) [ 2021 Apr 19 ] |
vrajesh.maniraja Can you show me the error you got? |
Comment by Tikhon Uskov (Inactive) [ 2021 Apr 19 ] |
henrik.aronsson sure. When you update Zabbix, you don't get updates for templates and media types. Download new YAML from GIT and import it. |
Comment by Vrajesh Mani Raja [ 2021 Apr 19 ] |
Maybe a bit of background info: We were using the webhook url on gitlab to get notifications on the teams channel when there was a push event to a project or when an issue was openend. After we noticed the notifications were not being pushed by the webhook, we set up the url in gitlab again. This is where i got the first error to the effect of - Testing failed. False. The error on opening the webhook url on browser was: Invalid webhook request - GET not supported
|
Comment by Henrik Aronsson [ 2021 Jun 07 ] |
Works out properly for us after updating the media template (we the changes according to this diff: https://git.zabbix.com/projects/ZBX/repos/zabbix/diff/templates/media/msteams/media_msteams.yaml?until=e3e211a5b903f13c47dd7dc6e275b38f4abf415b&at=refs%2Fheads%2Frelease%2F5.2
Thanks for your help! |