Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
belnea1
New Contributor II

Authenticate (local) User through API

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"
}
]
}

 

2 Solutions
funkylicious
SuperUser
SuperUser

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"

View solution in original post

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

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

 

If you have found a solution, please like and accept it to make it easily accessible to others.
NSE 4-5-6-7 OT Sec - ENT FW

View solution in original post

If you have found a solution, please like and accept it to make it easily accessible to others.NSE 4-5-6-7 OT Sec - ENT FW
3 REPLIES 3
funkylicious
SuperUser
SuperUser

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"
"jack of all trades, master of none"
ozkanaltas
Valued Contributor III

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

 

If you have found a solution, please like and accept it to make it easily accessible to others.
NSE 4-5-6-7 OT Sec - ENT FW
If you have found a solution, please like and accept it to make it easily accessible to others.NSE 4-5-6-7 OT Sec - ENT FW
belnea1
New Contributor II

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

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors