Skip to main content
mzainuddinahm
Staff & Editor
Staff & Editor
April 28, 2022

Technical Tip: Curl perform error:22 with Microsoft Teams integration webhook

  • April 28, 2022
  • 0 replies
  • 1868 views
Description This article describes that when a webhook is created from FortiGate to Microsoft Teams channel, error 'auto_curl_perform()-107: Curl perform error:22' is found in debug.
Scope FortiGate, MS Teams.
Solution

A webhook can be created to post messages and notifications to Microsoft Teams.

 

After creating webhook check using the show full-config command:

 

# config system automation-action
    edit "test-webhook"
        set action-type webhook
        set tls-certificate ''
        set minimum-interval 10
        set delay 0
        set required disable
        set protocol https
        set method post
        set uri  "outlook.office.com/webhook/XXXXXXX/IncomingWebhook/XXXXXXXX/XXXXXXX"
        set http-body "{\'text\':\'%%log%%\'}" <----- If the http-body string is entered in GUI it adds extra \\ (back slashes), Correct it using the CLI to type it as it is & test.
        set port 443
        set headers "Content-type:application/json"
    next
end

 

This causes the below error in the debug:

 

'auto_curl_perform()-107: Curl perform error:22. __action_webhook_status()-140: '

 

Microsoft Teams integration webhook: https://docs.fortinet.com/document/fortigate/6.4.4/administration-guide/910350/microsoft-teams-integration-webhook