Home

Microsoft Teams - Webhooks error

%3CLINGO-SUB%20id%3D%22lingo-sub-34807%22%20slang%3D%22en-US%22%3EMicrosoft%20Teams%20-%20Webhooks%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-34807%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I'm%20by%20no%20means%20a%20developer%2C%20so%20bare%20with%20me.%3C%2FP%3E%3CP%3EOne%20of%20our%20third%20party%20service%20supports%20webhooks.%20So%20I%20created%20an%20%22Incoming%20Webhook%20Connector%22%20for%20a%20Teams%20Channel%2C%20copied%20the%20URL%20and%20pasted%20into%20the%203rd%20party%20webhook%20URI%20Field.%3C%2FP%3E%3CP%3EDoesn't%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20receive%20this%20error%20from%20our%203rd%20party%20service%3A%3C%2FP%3E%3CP%3EPlease%20make%20sure%20the%20URI%20specified%20in%20the%20webhook%20accepts%20the%20webhook%20notifications.%3C%2FP%3E%3CP%3ELast%20error%3A%20400%20Bad%20Request%3C%2FP%3E%3CP%3EInvalid%20webhook%20request%20-%20Empty%20Payload%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20told%20by%20the%203rd%20part%20service%20that%20their%20webhooks%20don't%20send%20payloads%2C%20and%20instead%20send%20through%20POST%20with%20additioncal%20enconding.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyone%20have%20some%20clue%20what%20I'm%20supposed%20to%20do%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-34807%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-502017%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20-%20Webhooks%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-502017%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F259123%22%20target%3D%22_blank%22%3E%40dobrinsky%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3Ewe%20have%20integrated%20MS%20Team%20Channels%20with%20Jira.%20But%20with%20one%20particular%20webhook%20It%20is%20showing%20below%20error%20in%20the%20Jira%20logs.%3C%2FP%3E%3CPRE%3E%20httpclient-callbacks%3Athread-593%20WARN%20anonymous%20%20%20%20%20%5Bc.a.webhooks.plugin.PublishTaskFactoryImpl%24PublishTaskImpl%5D%20Client%20error%20-%20400%20when%20posting%20to%20web%20hook%20at%20'https%3A%2F%2Fconnectors.msteams-atlassian.com%2FJiraServer%2Fdc1a5387-3a24-41e6-b7b1-5147e931e18b%40105b2061-b669-4b31-92ac-24d304d195dc%2Fd0cfa88f-4a35-4428-8a99-f947c50b1162%2Fd90288b77dd94452b6aeb3d163e537b8%2F80675b58-f80f-4818-a31e-5f972e45f183%26nbsp%3B%3C%2FPRE%3E%3CP%3Ecould%20you%20please%20help%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20Advance%2C%3C%2FP%3E%3CP%3EManikanta%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-307624%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20-%20Webhooks%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-307624%22%20slang%3D%22en-US%22%3EHi%20Bill%2C%3CBR%20%2F%3E%3CBR%20%2F%3EWhere%20did%20you%20made%20those%20changes%3F%3CBR%20%2F%3E%3CBR%20%2F%3EHow%20do%20we%20get%20ti%20edit%20the%20options%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%2C%3CBR%20%2F%3EAndrei%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-152055%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20-%20Webhooks%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-152055%22%20slang%3D%22en-US%22%3E%3CP%3EI%20know%20this%20is%20really%20old%20-%20but%20we%20ended%20up%20having%20to%20set%20the%20Content-Length%20property%20in%20order%20to%20get%20this%20to%20work%2C%20oddly%20enough.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3Evar%3C%2FSPAN%3E%20%3CSPAN%3Eoptions%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%3CSPAN%3E%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3Emethod%3A%3C%2FSPAN%3E%20%3CSPAN%3E'POST'%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3Ehostname%3A%3C%2FSPAN%3E%20%3CSPAN%3E'outlook.office.com'%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3Eport%3A%3C%2FSPAN%3E%20%3CSPAN%3E443%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3Epath%3A%3C%2FSPAN%3E%20%3CSPAN%3E'%2Fwebhook%2F...'%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3Eheaders%3A%3C%2FSPAN%3E%3CSPAN%3E%20%7B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%22Content-Type%22%3C%2FSPAN%3E%3CSPAN%3E%3A%3C%2FSPAN%3E%20%3CSPAN%3E%22application%2Fjson%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%22Content-Length%22%3C%2FSPAN%3E%3CSPAN%3E%3A%3C%2FSPAN%3E%20%3CSPAN%3EdataStr%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3CSPAN%3Elength%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%20%7D%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%20%7D%3B%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EWithout%20the%20content-length%20the%20endpoint%20was%20always%20returning%20a%20400%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-71567%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Teams%20-%20Webhooks%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-71567%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Ivan!%20Apologies%2C%20looks%20like%20you%20haven't%20received%20an%20answer%20yet.%20Here's%20a%20link%20on%20%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Fmicrosoft-teams%2Fconnectors%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehow%20to%20get%20started%20with%20Connectors%3C%2FA%3E.%26nbsp%3B%3CSPAN%3EThe%20Incoming%20Webhook%20connector%20enables%20external%20services%20to%20notify%20you%20about%20activities%20that%20you%20want%20to%20track.%26nbsp%3BWhen%20you%20set%20up%20the%20connector%2C%20Microsoft%20Teams%20gives%20you%20a%20URL%20that%20you%20use%20to%20communicate%20with%20the%203rd%20party%20app%2C%20that%20looks%20like%20this%3A%20%3CA%20href%3D%22https%3A%2F%2Foutlook.office.com%2Fwebhook%2FXXX%2FIncomingWebhook%2FYYY%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foutlook.office.com%2Fwebhook%2FXXX%2FIncomingWebhook%2FYYY%3C%2FA%3E...%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPlease%20reach%20out%20if%20you're%20still%20having%20trouble.%20Good%20luck!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Ivan Unger
Valued Contributor

Hi, I'm by no means a developer, so bare with me.

One of our third party service supports webhooks. So I created an "Incoming Webhook Connector" for a Teams Channel, copied the URL and pasted into the 3rd party webhook URI Field.

Doesn't work.

 

I receive this error from our 3rd party service:

Please make sure the URI specified in the webhook accepts the webhook notifications.

Last error: 400 Bad Request

Invalid webhook request - Empty Payload

 

I was told by the 3rd part service that their webhooks don't send payloads, and instead send through POST with additioncal enconding. 

 

Anyone have some clue what I'm supposed to do?

4 Replies

Hi Ivan! Apologies, looks like you haven't received an answer yet. Here's a link on how to get started with ConnectorsThe Incoming Webhook connector enables external services to notify you about activities that you want to track. When you set up the connector, Microsoft Teams gives you a URL that you use to communicate with the 3rd party app, that looks like this: https://outlook.office.com/webhook/XXX/IncomingWebhook/YYY...

 

Please reach out if you're still having trouble. Good luck!

I know this is really old - but we ended up having to set the Content-Length property in order to get this to work, oddly enough.

 

var options = {
method: 'POST',
hostname: 'outlook.office.com',
port: 443,
path: '/webhook/...',
headers: {
"Content-Type": "application/json",
"Content-Length": dataStr.length
}
};
 
Without the content-length the endpoint was always returning a 400
Hi Bill,

Where did you made those changes?

How do we get ti edit the options?

Thank you,
Andrei

@dobrinsky,

Hi,

we have integrated MS Team Channels with Jira. But with one particular webhook It is showing below error in the Jira logs.

 httpclient-callbacks:thread-593 WARN anonymous     [c.a.webhooks.plugin.PublishTaskFactoryImpl$PublishTaskImpl] Client error - 400 when posting to web hook at 'https://connectors.msteams-atlassian.com/JiraServer/dc1a5387-3a24-41e6-b7b1-5147e931e18b@105b2061-b669-4b31-92ac-24d304d195dc/d0cfa88f-4a35-4428-8a99-f947c50b1162/d90288b77dd94452b6aeb3d163e537b8/80675b58-f80f-4818-a31e-5f972e45f183 

could you please help ?

 

Thanks in Advance,

Manikanta

Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
202 Replies