Created on
‎03-30-2025
10:23 PM
Edited on
‎09-08-2025
05:37 AM
By
Jean-Philippe_P
Description | This article describes how to resolve Token drift and token sync errors when using FortiToken Two-factor authentication for SSL VPN login. |
Scope | FortiGate, FortiToken Mobile. |
Solution |
FortiToken drift indicates a time synchronization issue. It can occur due to a system time change on a FortiGate or a mobile device. For authentication to work correctly, the clocks of the FortiToken and the authentication server must be closely aligned. A similar problem can also appear due to the NTP connectivity issue, as mentioned in this KB article, Technical Tip: SSL VPN user with FortiToken but NTP was not synchronized.
The drift adjustment can be handled by adding a token code from a FortiClient. To verify the issue, run the following debugs and check for the presence of the indicated logs.
diagnose debug reset diagnose debug console timestamp en diagnose debug app fnbamd -1 diagnose debug app sslvpn -1 diagnose debug enable
To disable debugs:
diagnose debug disable diagnose debug reset
If the log 'drifted, asking for the next token' is present, the FortiClient will ask for the Token code again. Wait for the code to change on the mobile device and enter the new code. This will take care of the drift adjustments.
Note: If the same Token code is added twice, it will fail the SSL VPN login with a sync error in the debug logs.
2025-03-29 19:31:41 [962:root:8]user 'amrit' uses 2FA: ctx->peer_two_factor = 0, ctx->peer_name.peername = 0, 2025-03-29 19:31:41 [2194] handle_req-Token drifted, asking for the next token req 4131895685121, len=2596 fnbam_auth_update_result return: 8 (next token code required) Receive Manually input token result. Push: 0 Authenticated groups (1) by FNBAM with auth_type (1)
2025-03-29 19:32:09 [963:root:8] two-factor check for amrit: off ctx->peer_two_factor = 0, ctx->peer_name.peername = 0, [2276] handle_req-Rcvd token sync req for 4131895685121 fnbam_user_auth_group_match-req id: 4131895685121, server: amrit, local auth: 1, dn for req 4131895685121, len=2596
Debug output for IPsec tunnel. When working with an IPsec VPN, a similar kind of error can be seen on the FortiGate, as shown below:
ike V=root:0:IPSECTunnel_7:695127: XAUTH 82880181924320 result FNBAM_NEED_TOKEN E00002446D41F40B680F82385BC730AA06E79BC1DA89A3E240B7A384 D17059DB491EACA00000023010090AFC0880002408B0000408C000F466F7 0000005C0E00002431216CEB72EAAC275CCA08F42FCF158B8E97AF7BF455644A571 BF8C4010E81F100000016020090AFC0880002408B0006353136353439B
This also indicates the same problem, and can also be fixed either by checking the FortiGate and Client side Time or by performing the below command to sync it.
The sync can also be triggered from the FortiGate:
execute fortitoken sync <FortiToken_ID> <token_code1> <next_token_code2>
Related articles: |
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.