Skip to main content
belnea1
Explorer
January 2, 2025
Solved

Authenticate (local) User through API

  • January 2, 2025
  • 3 replies
  • 1676 views

Happy new year everyone.

I want to authenticate a user through the Forti API, after the user finishes to authenticate against a 3rd party captive portal.


I figured the API command would be: 

https://FORTI-IP/api/v2/monitor/user/firewall/auth?vdom=root

{
"users": [
{
"ip": "10.235.1.50",
"ip_version": "ipv4",
"method": "firewall",
"user_type": "firewall",
"username": "test4"
}
]
}


But I'm getting 424 Failed Dependency.

Unfortunately I don't know what parameter is missing and I do not have access to the developer portal to read the documentation.


FYI
Deauthentication works fine like this:
https://FORTI-IP/api/v2/monitor/user/firewall/deauth?vdom=root

{
"users": [
{
"id": 0,
"ip": "10.235.1.50",
"ip_version": "ip4",
"method": "firewall",
"user_type": "firewall"
}
]
}

 

Best answer by funkylicious

Hi,

On FNDN for this API call /user/firewall/auth, you only need:

{   "username": "string",   "ip": "string",   "server": "string" }

 

3 replies

funkylicious
SuperUser
SuperUser
January 2, 2025

Hi,

On FNDN for this API call /user/firewall/auth, you only need:

{   "username": "string",   "ip": "string",   "server": "string" }

 

"jack of all trades, master of none"
ozkanaltas
Valued Contributor III
January 2, 2025

Hello @belnea1,

 

When I compare your API request and API document for auth, your API request is different than mentioned in the document. Can you try to change your request as in the document document?

 

{  "username": "string",  "ip": "string",  "server": "string" }

 

image.png

 

belnea1
belnea1Author
Explorer
January 2, 2025

Thank you both so much for your quick and helpful replies! 

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.