| Description | This article describes how to fix REST API Failure event generated when integrate FortiGate with FortiNAC. |
| Scope | FortiNAC, FortiGate, REST API. |
| Solution |
In a FortiGate FortiSwitch-FortiLink integration, the REST API is required for communication with FortiNAC and must be configured. PollThread-trap3 request status = 401, response = If the request fails with a status 401 or 403 while using an API token, FortiNAC will automatically revoke the token and raise an Event REST API Failure, with the message 'REST API failure for device FW-FortiGate with message request exception invalid API Token when connecting to 10.5.30.25'. FortiNAC executes the GET requests in the following format:
Executing request GET /api/v2/monitor/user/device/query?filter=is_online%3D%3Dtrue&access_token=t9xjpyapz8obyrfs5rb39djw3cxt4i6g&vdom=* HTTP/1.1 INFO yams - pool-13-thread-1 request details = https://10.5.30.25:10443/api/v2/monitor/user/device/query?filter=is_online==true&access_token=*****&vdom=*
In order to use the access_token as a URL parameter, FortiGate configuration must be adjusted to allow this behavior. The following commands enable the option:
config system global set rest-api-key-url-query enable end
Related documents: FortiGate Endpoint Management Integration - FortiNAC-F documentation |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.