Intermittent 2FA issues

Karlo Matan asked on July 23, 2026 15:32

Hi all, we are facing an intermittent issue in our production environment where the same 2FA code will fail and the subsequently pass. There doesn't seem to be a pattern on how/when it happens, sometimes it works fine one the first try, sometimes it's more stubborn.

The setup on Azure is as following: * Separate hosting for CMS and live site * Each app service has 2 instances with Session Affinity off

The same setup is present in a lower stage environment where I am unable to reproduce the issue.

Is there something I can do to try and reset the 2FA site-wide, this just seems like there is a time drift between the 2FA provider and the hosted instance.

Thank you, Karlo

Recent Answers


Faisal Ahmed Rony answered on July 26, 2026 16:52 (last edited on July 26, 2026 16:52)

Hi Karlo,

This usually happens due to time drift between your Azure instances or because Session Affinity is turned off across multiple instances.

A few quick things to check:

  1. Azure Clock Sync: Ensure time sync is accurate across all instances, as even a few seconds of drift causes TOTP validation to fail randomly.
  2. Clock Skew Tolerance: Increase the allowed time window/tolerance in your 2FA settings slightly to account for minor time differences.
  3. Session Affinity / Distributed Cache: If token states are stored in local memory instead of a distributed cache (like Redis), requests hitting different instances can fail.

Hope this helps!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.