2FA Setup with Microsoft Authenticator - invalid security code

Zammad version 6.2.0-1708118350.40885257.jammy
Ubuntu VM, MS Edge browser

After enabling Authenticator App, I am unable to enroll MS Authenticator (from Google Play). Zammad does not accept code, generated by app.
My account in Zammad are domain based, synced via LDAP sync, and synced with our tenant in Entra ID.
Please provide any info how to troubleshoot.

try to disable the 2FA for your user by console

zammad run rails c
user = User.find_by(email: 'email@domain.com')
user.update!(otp_required_if_login: false)

Hi @voljka. Some logs might be helpful, if any.

I, [2024-03-20T01:02:16.409973#627-3141640] INFO – : Started POST “/api/v1/users/two_factor_verify_configuration” for A.B.C.D at 2024-03-20 01:02:16 +0200
I, [2024-03-20T01:02:16.425243#627-3141640] INFO – : Processing by User::TwoFactorsController#two_factor_verify_configuration as JSON
I, [2024-03-20T01:02:16.425319#627-3141640] INFO – : Parameters: {“method”=>“authenticator_app”, “payload”=>“123456”, “configuration”=>{“secret”=>“XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”, “provisioning_uri”=>“otpauth://totp/Company%20Portal:name.surname%40company.lv?secret=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&issuer=Company%20Portal”}}
I, [2024-03-20T01:02:16.437414#627-3141640] INFO – : Completed 200 OK in 12ms (Views: 0.1ms | ActiveRecord: 2.6ms | Allocations: 5360)

I solved this issue. Due to firewall misconfiguration, NTP protocol was disabled for Zammad VM.
So, host time was off about 2 min. After allowing NTP protocol and restarting systemd-timesyncd service problem gone.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.