SOLVED

Azure DevOps Service Hooks & Teams Incoming Webhooks

%3CLINGO-SUB%20id%3D%22lingo-sub-1569050%22%20slang%3D%22en-US%22%3EAzure%20DevOps%20Service%20Hooks%20%26amp%3B%20Teams%20Incoming%20Webhooks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1569050%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%2C%20I'm%20trying%20to%20determine%20how%20to%20utilize%20the%20Service%20Hooks%20in%20Azure%20DevOps%20so%20that%20we%20can%20tie%20into%20Teams%20via%20an%20incoming%20webhook%20to%20automatically%20post%20to%20a%20channel%20in%20Teams%20whenever%20a%20Pull%20Request%20is%20created.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20run%20a%20test%20on%20the%20Azure%20side%20posting%20to%20the%20Incoming%20Webhook%20url%20from%20the%20Teams%20channel%20-%20I%20just%20get%20a%20400%2FBad%20Request%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20assume%20the%20issue%20has%20to%20do%20with%20the%20format%20of%20the%20payload%20being%20sent%20from%20Azure%20and%20the%20format%20that%20the%20O365%20connector%20is%20requiring%20-%20but%20I%20can't%20seem%20to%20find%20anything%20on%20this%20topic.%26nbsp%3B%20Has%20anyone%20configured%20something%20like%20this%20or%20does%20anyone%20have%20some%20suggestions%20I%20can%20look%20into%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20time!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1569050%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20DevOps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIncoming%20Webhooks%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EService%20Hooks%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETeams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1573533%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20DevOps%20Service%20Hooks%20%26amp%3B%20Teams%20Incoming%20Webhooks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1573533%22%20slang%3D%22en-US%22%3EWhat%20kind%20of%20data%20are%20you%20sending%20to%20the%20webhook%3F%20A%20card%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1573531%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20DevOps%20Service%20Hooks%20%26amp%3B%20Teams%20Incoming%20Webhooks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1573531%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F750636%22%20target%3D%22_blank%22%3E%40Sarverizer%3C%2FA%3E%26nbsp%3BCheck%20this%20lab%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.azuredevopslabs.com%2Flabs%2Fvstsextend%2Fteams%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.azuredevopslabs.com%2Flabs%2Fvstsextend%2Fteams%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EIt%20will%20do%20what%20you%20need.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi everyone, I'm trying to determine how to utilize the Service Hooks in Azure DevOps so that we can tie into Teams via an incoming webhook to automatically post to a channel in Teams whenever a Pull Request is created.  

 

When I run a test on the Azure side posting to the Incoming Webhook url from the Teams channel - I just get a 400/Bad Request

 

I assume the issue has to do with the format of the payload being sent from Azure and the format that the O365 connector is requiring - but I can't seem to find anything on this topic.  Has anyone configured something like this or does anyone have some suggestions I can look into?

 

Thanks for your time!

5 Replies
best response confirmed by Sarverizer (New Contributor)
What kind of data are you sending to the webhook? A card?

@Alexis CONIA thank you for the reply - we are trying to use a Service Hook that will trigger when a Pull Request has been created.  It was our hopes that when that happens, it would hook into Teams and post to a given channel using the email link for said channel via that Outlook webhook.  We'd be open to any alternatives providing we can automatically post to a channel when that Pull Request is created.

 

Thanks for your time,

Scott

@Tiago Costa thank you for this, I'll check it out and report back.

This was exactly what we were looking for - thank you very much!