FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Lovepreet_Dhillon
Article Id 322217
Description This document demonstrates how to send alert notifications to a Microsoft channel with the automation action type 'Microsoft Teams Notification'.
Scope

FortiOS.

Solution

The configuration consists of two components:

 

  1. An incoming Webhook connector in a Microsoft Teams channel.
  2. An automation stitch to trigger an action on the FortiGate side.

To add the Incoming Webhook connector in a Microsoft Teams channel:

 

  1. In Microsoft Teams, select Apps on the left navigation bar.
  2. Search for 'Incoming Webhook' and select 'Add to a team'.
 

image.png

 

 

  1. Select the existing channel to create the notifications for.

image.png

 

  1. Select 'Set up a connector'.

 

 

image.png

 

 

  1. Provide a name and select Create.

 

 

image.png

 

 

  1. Copy the URL below to save it to the clipboard, then select save(This URL will be needed when configuring the Webhook Automation Stitch on the FortiGate.)

  2. Select Done.

 

 

image.png

 

On the FortiGate side:

 

Configuring a Webhook Automation Stitch on the FortiGate:

 

  1. Configure an Automation Action with type 'microsoft-teams-notification'. Note that the URL from Teams that was saved earlier will be used here with the set uri option.

config system automation-action 

    edit "TEAMS_ACTION"

        set description ''

        set action-type microsoft-teams-notification

        set minimum-interval 0

        set message-type text

        set message "%%log%%"

        set uri "URL from Teams that was saved earlier "

    next

end

 

image.png

 

  1. Configure an Automation Stitch using the new microsoft-teams-notification Automation Action, along with an appropriate Automation Trigger:

    In this example, the Automation Stitch will be triggered when the FortiGate configuration is modified (i.e. the trigger is 'configuration change').

config system automation-stitch

    edit "TEAMS"

        set trigger "Configuration Change"

        config actions

            edit 1

                set action "TEAMS_ACTION"

                set required enable

            next

        end

    next

end

 

image.png

 

The following is an example of the output produced by the above FortiGate Automation Stitch in Microsoft Teams:

 

image.png