Description
This article describes how to re-add a trial or licensed FortiToken Mobile (FTM) after accidentally deleting it without restoring a backup configuration, or how to restore a license stuck in a state where it is not possible to provision the trial FortiToken to a user. This also covers RMA devices that have been replaced where the configuration has been restored. It will be necessary to delete the two tokens as well. In the second half of this article, there is an explanation of how to re-add a deleted, accidentally licensed FortiToken Mobile. Otherwise, error messages like 'input value is invalid' or 'no valid token found' may be seen.
Scope
Any FortiGate device with a license key file (usually PDF file) with a 20-character activation code tied to the device.
Solution
Part #1:Trial tokens:
The solution is to delete the other trial tokens and download them again from the FortiGuard network.
This step-by-step guide uses the two FortiTokens included in the FortiGate, running under the license FTMTRIALXXXXXXXX, with one of the two FortiTokens already deleted.
- One token is missing:

-
To import the missing FortiToken again, the remaining FortiToken has to be deleted as well. To find out which token belongs to the trial license, check the backup configuration in the 'config user fortitoken' section. A line referring to the trial license should be displayed.
edit "FTKMOBXXXXXXXXX"
set license "FTMTRIALXXXXXXXXXX"
next
end
If the FortiToken to be deleted is already associated with a user, remove their association first.
-
Delete the FortiToken by selecting it and deleting it.
-
Once both free trial FortiTokens are removed, it is possible to either download them again from the FortiGuard network with the download button or by using a specific license number.
-
The Import Free Trial FortiToken button will appear:
-
An input field for an 'Activation Code' will be presented. For the aforementioned trial FortiTokens, the Activation Code is 0000-0000-0000-0000-0000:

Note: On FOS 7.6, this still works, but is no longer necessary as there is a button for the same function if the trial tokens are both missing.
The FortiTokens should be displayed in the list again:

If VDOMs are enabled, trial Tokens are in the management VDOM (the root by default).
- In the following image, seven tokens are listed (2 trial, and 5 licensed). Two of them either have already been provisioned or are pending application to user accounts.
-
If any of the licensed tokens have been accidentally purged, they can be restored and re-added to the device by following the next steps:
-
In the FortiGate GUI, navigate to User & Authentication -> FortiTokens and select Create New. In the example below, three mobile tokens were purged.
-
Select 'Mobile Token' as the Type, then copy and paste the Activation Code from the PDF file:
- If the unit is not registered:
import fortitoken license error: -7571
- If the serial code format is incorrect:
exec fortitoken-mobile import 0000-0000-0000-0000-00
import fortitoken license error: -7566
Related articles:
Forti-Mobile token configuration in detail
How to move FortiToken Mobile between VDOMs
Technical Note: FortiToken basic troubleshooting
Technical Note: FortiToken activation failure
Troubleshooting Tip: import FortiToken license, 'Internal server error', error: -7650