Microsoft Teams Webhook Setup Guide

I spent some time diving into webhooks over the weekend and I recall someone asking how to get the Microsoft Teams integration up and running, so I thought I would go through each of the steps along the way to getting it working. Note that this guide will allow you to post a chat message into a channel within Teams and not within a private or group chat.

Pre-requisite - You must have the “Incoming Webhook” connector available to you to use. If this is not enabled, then your Teams admin will need to make some adjustments in the permissions at the organization level. This will be a combination of setting the Teams apps → Manage apps to allow “Incoming Webhook” and potentially an adjustment to the Manage apps → Permission Policies to allow apps to be used. Note that changes made for permissions can take up to 24 hours to take effect. For me, I was able to access the Incoming Webhook connector to configure after a few hours on the web side of Teams, but not until the next day within the desktop application.

With that out of the way, jump into teams and head to the channel where you want the status notifications to appear. Click the three dots in the upper right hand corner and select “Connectors”.

image

From the next screen, find the Incoming Webhook connector and click Configure. On that next screen, you just need to put in the name of the Incoming Webhook (this will be the name shown in the Channel when it posts) and upload an image for it to use as well. Once that’s done, it will generate a URL for you - grab that URL and save the connector.

Now it’s time to move on over to your eramba instance and create a webhook notification whereever it suits your fancy. Set the fields as follows:

Method: POST
Endpoint URL:
Headers: ContentType: Application/json
Content: {“text”:“Words you want to say plus eramba macros”} (Note - I used a simple “Hello World” for testing)
Content that I used: {“text”:“A new comment or attachment has been posted on Control %SECURITYSERVICEMAINTENANCE_SECURITY_SERVICE% that can be found at the following link %ITEM_URL%”}

Wrapping it all up, I triggered the notification and observed a victory within Teams!

4 Likes

To get the Teams webhook working, the headers field should exactly match with the Example (or use Content-Type). Apparently, this field is case-sensitive.
When just copying the example provided in Eramba under the text box, the letter “t” from the sample is shown in lowercase and your message will not be delivered.