how do i export the forti token users list in my fortigate?
i have about 180 users in the list
Hi @yeowkm99
Unfortunately, it would not be possible to export FortiToken user list. You can either obtain the respective from the configuration file, or copy the respective information in the GUI.
Dear Yeowkm99,
There is no direct option to export the users. You can use below methods:
1. manually copy and paste them from the config ( in CLI show)
2. manually copy and paste one by one from the GUI
Easiest way is the below
-------------------------
3. run the command on the CLI to check the list and copy+paste it manually:
# show | grep -f two-factor
You can use linux and small scripting :)
###### Fortigate: ######
ssh from linux
ssh <fortigate> | tee temp-output.txt
config system console
set output standard
end
show full-configuration user local
config system console
set output more
end
###### Linux: ######
cat temp-output.txt | egrep 'edit|status|type|two-factor|FTK|mail' | sed 's/set//;s/\r//g' > user-list-tokens.txt
echo "USER;STATUS;TYPE;2FACTOR METHOD;DEVICE;;EMAIL" > user-list-tokens.csv
cat user-list-tokens.txt |tr -d '\n' | sed 's/edit/\n/g;s/status/;status/g;s/type/;type/g;s/two-factor fortitoken/;two-factor fortitoken/g;s/two-factor email/;two-factor email;/g;s/fortitoken "FT/;FT/g;s/email-to/;email-to;/g;s/two-factor disable/;two-factor disable;/g' >> user-list-tokens.csv
Import csv to excel sheet
Excel formulas:
Number of users using fortitoken auth | =COUNTIF(user_list_tokens[2FACTOR METHOD];"*fortitoken*") |
Number of users using email token | =COUNTIF(user_list_tokens[2FACTOR METHOD];"*email*") |
Number of users without MFA | =COUNTIFS(user_list_tokens[2FACTOR METHOD];"*disable*";user_list_tokens[STATUS];"*enable*") |
User | Count |
---|---|
2626 | |
1400 | |
810 | |
672 | |
455 |
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.