Skip to main content

Hello,



I set up the following four webhooks for testing within my JAMF server (Global Management -> Webhooks), they are as follows:



Notify on MobileDeviceEnrolled (JSON)
Notify on MobileDeviceUnEnrolled (JSON)
Notify on JSSShutdown (JSON)
Notify on JSSTartup (JSON)
REQUEST.BIN TEST (JSON)



These tie into our Microsoft Teams chat client, specifically using the 'Incoming Webhook' connector. The URLs provided are accurate and triple checked.



Any of these events that occur generate a webhook, which was verified with REQUEST.BIN, however, I am not notified in Microsoft Teams.



JAMF Support initially had me change the Webhook from XML to JSON, but there was no success.



Any suggestions?

<subscribed>


Keeping an eye on this as well.


"Paging @brysontyrrell …"


@ian2buckz I'm going to assume you're using the inbound webhooks for MS Teams to create cards?



https://dev.outlook.com/Connectors/GetStarted



Support only got you part of the way. Check out this guide here:
https://dev.outlook.com/Connectors/GetStarted#post-a-card-to-the-webhook



The cards you're creating need to have the following JSON format:



{
"title": "<optional>",
"text": "",
}


You need an in-between service to take the webhook event from the JSS and translate it into the format MS Teams wants for new cards.



Jamf Pro --> Webhook fires --> Your service translates --> Post to MS Teams



Likely you'll also want to do some formatting on the string that becomes the "text"* value. The cool thing is, it looks like from Microsoft's example you can leverage markdown for getting in some rich text.



Check out the dev docs on card objects:
https://dev.outlook.com/Connectors/reference


@brysontyrrell



OK. Got cURL up and running, this is where I am at:



curl -H "Content-Type: application/json" -d "{"text": "Hello World!"}" <YOUR WEBHOOK URL>



I understand in <YOUR WEBHOOK URL> is where I place my URL.



How do I get your format in the command line properly?


@ian2buckz the <YOUR WEBHOOK-URL> would be the URL to the MS Teams connector webhook you created.



But, you can't use cURL for this on its own. You need a receiver to take the JSON from Jamf Pro webhook and then make a POST to to the MS Teams webhook.



Check out some examples here:https://github.com/brysontyrrell/Example-JSS-Webhooks


Ahh. Well, this is a project for another day.



Thanks!


any tips for using the Jamf Pro > Settings > Webhooks with Microsoft Teams? 

I made an entry in Jamf with the webhook URL and specified JSON (the other choice is xml) and I am not seeing anything in MS Teams.


Reply