Created on
‎03-27-2020
12:08 AM
Edited on
‎09-04-2025
10:42 PM
By
Anthony_E
Description
This article describes the procedure to migrate Hardware and Mobile FortiTokens to a new FortiGate or FortiAuthenticator.
FortiToken Mobile licenses can be migrated in the following scenarios:
Hardware tokens can be migrated in the following cases:
Scope
FortiAuthenticator, FortiToken, FortiGate.
Solution
Note: For FortiToken Mobile licenses shipped on or after August 4 2025, FortiToken Mobile license transfer is only permitted in cases of RMA for a failed device. See the article Technical Tip: FortiToken Mobile no longer supports License Transfer between different devices. FortiToken Mobile licenses shipped before August 4 2025 do not have this restriction and may be transferred to FortiGate or FortiAuthenticator devices that are not RMA replacements.
For FortiToken Mobile licenses purchased after this change, if a device hosting a FortiToken Mobile license will be replaced for reasons other than hardware fault, either a new FortiToken mobile license must be purchased and applied to the new device, or FortiToken Mobile license must be transferred to a FortiToken Cloud subscription before the migration, following the procedure in the FortiToken Cloud Admin Guide.
By design, FortiTokens (except the hardware FortiToken-211 and FortiToken-300 series) are always linked to the serial number of the unit on which they are activated.
If tokens must be moved to another unit, the Token license (Mobile Tokens) or Token seed (Hardware Tokens) should be transferred and manually added to the new unit. For FortiToken Mobile licenses shipped on or after August 4 2025, license transfer is only permitted for units that were RMA'd.
This involves deleting all tokens on the old unit and recreating the tokens on the new unit, and assigning all tokens to users again.
Note: If a migration involves moving from a VM to another VM (FortiGate VM to FortiGate VM, or FortiAuthenticator VM to FortiAuthenticator VM), and the VM serial number stays the same, the below is NOT required: the configuration simply needs to be migrated in full. The steps below are necessary when the device's serial number changes.
If FortiToken Mobile licenses need to be moved in case of RMA, this is done via a ticket to Fortinet Customer Service; the ticket should include the original and new device's serial numbers, along with the FortiToken license serial number.
If hardware FortiTokens are moved, this can be done by Technical Support through a ticket as well; the ticket needs to include the FortiToken serial numbers in question.
FTK-211 series tokens differ a bit - the seed files are not in Fortinet's possession, but instead stored on a CD that is shipped along with the hardware tokens. Moving the tokens to a new unit requires the CD with seed files.
Note:
FortiGate and FortiAuthenticator devices come with two free trial mobile tokens. These tokens cannot be moved; it is distinguishable in that the associated license number follows the pattern FTMTRIALxxxxxxxxxx.
FortiGate
Preparation: User Migration.
FortiTokens are usually assigned to local users on FortiGate (with passwords stored locally or on LDAP).
If the migration should also include user accounts, then there are three options:
Alternatively, to import only the user list, the whole 'config user local' part can be extracted. In a text editor, remove the lines containing 'two-factor' and 'fortitoken' and import them via the CLI.
The usual local user with an assigned token is in the following format:
config user local
edit "syntest"
set type password
set two-factor fortitoken
set fortitoken "FTKMOB*******"
set email-to "test@domain.com"
set sms-phone "+123456789"
set passwd-time 2019-05-25 22:13:28
set passwd ENC *******
next
Note:
The lines with 'two-factor and 'fortitoken' need to be stripped because FortiTokens cannot simply be migrated as part of the FortiGate configuration, due to the license/seeds being bound to the old serial number and needing to be associated with the new serial number first.
Example: Bulk removes two-factor and FortiToken from users with Notepad++.
config user local
show
<use space until the full table displays>
end
In the 'Find what:' field enter: set two-factor fortitoken.
In the 'Replace' tab on the 'Replace with:' field enter: unset two-factor.
In the 'Find what:' field enter: set fortitoken '\w+'.
In the 'Replace' tab on the 'Replace with:' field leave blank.
Select the 'Replace All' button.
On FortiOS GUI, in the top right corner, select the admin user Configuration -> Script -> Run Script -> Upload saved file and select OK.
It might show an error, but the local users will still be applied without the two-factor/FortiToken settings.
This association with the new serial number may fail if the token serial numbers already exist in the new configuration.
Users from FortiAuthenticator cannot be migrated to FortiGate directly: FortiAuthenticator users can only be exported in CSV format, which FortiGate cannot parse. In that case, users will need to be created manually on FortiGate in some manner.
FortiToken Migration.
After the FortiToken licenses have been transferred to the new unit and hardware FortiTokens have been reset (meaning the seeds are marked as available again and can be downloaded by the new FortiGate), the FortiTokens need to be imported into the FortiGate:
Registration via FortiGate CLI:
If using a CSV file, it should be in the following format with one record per line: user name (30 characters max), first name (30 characters max), last name (30 characters max), email address (75 characters max), mobile number (25 characters max), password (optional, 128 characters max).
If the optional password is left out of the import file, the user is emailed temporary login credentials and requested to configure a new password.
Note that, even if an optional field is empty, it still must be defined with a comma. In the GUI: Go to Authentication -> User Management -> Local Users and select' Import'.
Technical Tip: Error status on FortiGate Hardtoken
Technical Tip: Hard Token error 'token already activated, and seed won't be returned'
Technical Tip: FortiToken basic troubleshooting
Troubleshooting Tip: FortiGate FortiToken configuration and troubleshooting resource list
Technical Tip: FortiToken Mobile does not support License Transfer
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.