Skip to main content
Skip table of contents

Microsoft Teams API Integration

Feature still in development - Remove this once the feature is released

When do you need this

In case you want to send a Microsoft Teams message in a channel when a certain trigger is fired in Peripass.


How to setup

The basics

  1. First of all, it is important that you set up a Microsoft account that is assigned a Teams license.

  2. With the account from the previous step log in to https://developer.microsoft.com/en-us/graph/graph-explorer. In the left hand pane scroll down to Microsoft Teams > my joined teams.

  3. Here, click Run query and below get the "id" of the Team the desired channel is part of.

  4. Again in the left hand pane scroll down to Microsoft Teams > channels of a team which I am member of.

  5. Here, in the query editor replace {team-id} with the "id" from step 3.

  6. Once done, click Run query and below get the "id" of the channel you want to send messages in.

  7. Lastly, click the Access token tab in de query editor and copy the token displayed.

Peripass Triggers & Actions

  1. First configure the trigger you want to set off a message.

  2. Then select the Execute API call action.

  3. As URL set “https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages” (Parts between {} need to be replaced with the real values)

  4. Method needs to be POST.

  5. The Data field must contain the following:

JSON
{
    "body": {
        "content": "Here, fill in the message you want to send when the trigger is fired."
    }
}
  1. As Headers, fill in the following:

Content-type application/json

Authorization Bearer {Access token} (Part between {} needs to be replaced with the real value)

  1. Afterwards, just click Save changes? and all should be set up.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.