Using the FortiGate API to retrieve the RADIUS or TACACS+ secret key
Description | This article describes how to recover the RADIUS or TACACS+ secret key via the FortiGate CLI. |
Scope | FortiOS. |
Solution | If the secret key for a RADIUS or TACACS+ server is forgotten, it is possible to view the decrypted form by querying the FortiGate's API.
![]()
![]()
![]()
![]() The secondary server's secret will NOT be visible with this method, but there is a workaround: ![]() The encrypted password can be copied to a new RADIUS / TACACS+ server entry, where the same trick can be performed. Here is the correct password to copy: ![]()
![]() The name of the server is 'example2', and when the same trick is performed, the secret is visible: ![]() |








