2FA on Microsoft Teams fails (wrong timestamp)
2FA on Microsoft Teams fails (wrong timestamp)
Hi
I have a strange problem: I can't login to Microsoft Teams on my Win11 Virtualbox installation. The two factor authentication always fails. If I check the timestamp, I can see that the MS teams requests a code that is 2 ours behind my local time. The displayed time of the operation system itself is correct.
I know that there is a problem with local time/UTC between Linux and Windows. I already tried changing the Linux host to local time (timedatectl set-local-rtc 1). Has no impact. I also tried the " Enable Hardware Clock in UTC time" setting in the Virtualbox configuration, no change.
My setup:
Virtualbox: Version 7.0.14
Host: Ubuntu 2310
Guest: Win11
Any idea how to solve this problem?
Thank you.
I have a strange problem: I can't login to Microsoft Teams on my Win11 Virtualbox installation. The two factor authentication always fails. If I check the timestamp, I can see that the MS teams requests a code that is 2 ours behind my local time. The displayed time of the operation system itself is correct.
I know that there is a problem with local time/UTC between Linux and Windows. I already tried changing the Linux host to local time (timedatectl set-local-rtc 1). Has no impact. I also tried the " Enable Hardware Clock in UTC time" setting in the Virtualbox configuration, no change.
My setup:
Virtualbox: Version 7.0.14
Host: Ubuntu 2310
Guest: Win11
Any idea how to solve this problem?
Thank you.
Re: 2FA on Microsoft Teams fails (wrong timestamp)
Provide more information about your VM (and its config). Do you have Guest Additions installed inside the VM? Any other influence on the time used by the guest OS?
Re: 2FA on Microsoft Teams fails (wrong timestamp)
Guest Additions are installed, yes.
I tried to login into some other accounts with the browser. Mozilla login with 2FA in browser works for example, but login into Microsoft account in a browser fails too (in Firefox or Edge). Seems to be a Microsoft problem.
I couldn't detect any other problem with the time yet.
I tried to login into some other accounts with the browser. Mozilla login with 2FA in browser works for example, but login into Microsoft account in a browser fails too (in Firefox or Edge). Seems to be a Microsoft problem.
I couldn't detect any other problem with the time yet.
-
- Posts: 7
- Joined: 10. Mar 2023, 10:34
Re: 2FA on Microsoft Teams fails (wrong timestamp)
On Manjaro forum we usually recommend modifying the Windows Guest to use UTC and disable the guest NtpClientCorono wrote: ↑2. Apr 2024, 15:03 I know that there is a problem with local time/UTC between Linux and Windows. I already tried changing the Linux host to local time (timedatectl set-local-rtc 1). Has no impact. I also tried the " Enable Hardware Clock in UTC time" setting in the Virtualbox configuration, no change.
Any idea how to solve this problem?
https://forum.manjaro.org/t//1167
On a systemd based host - run as root
Code: Select all
timedatectl set-local-rtc 0
systemctl enable --now systemd-timesyncd
You can also do it manually using regedit and navigate the tree - you may need to create the entries if they do not exist.
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient]
"Enabled"=dword:00000000
Re: 2FA on Microsoft Teams fails (wrong timestamp)
Thank you for your answer. Tried it. Still doesn't work:
Timestamp: 2024-04-03T15:35:40Z
Which is two hours behind.
Timestamp: 2024-04-03T15:35:40Z
Which is two hours behind.
Re: 2FA on Microsoft Teams fails (wrong timestamp)
The timesync service which is part of VirtualBox Guest Additions is known to handle time zones correctly. But if you see a 2 hour difference in the VM then something else must be "winning" against it. Because timesync would do a step adjustment if the difference is bigger than 2 minutes.
-
- Volunteer
- Posts: 5678
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: 2FA on Microsoft Teams fails (wrong timestamp)
I'm wondering if you're perhaps confusing something related to time zones, because "15:35:40Z" equals "17:35:40 CEST/MESZ", which was roughly 5 minutes earlier than your post that I'm replying to.
Re: 2FA on Microsoft Teams fails (wrong timestamp)
Hmm, then it is probably not a timestamp problem. This would explain why all other 2FA logins work except the one from Microsoft.
What could be the problem then? I can't login to Microsoft nether in browser nor in Teams itself. But other 2FA logins work.
-
- Posts: 7
- Joined: 10. Mar 2023, 10:34
Re: 2FA on Microsoft Teams fails (wrong timestamp)
You are right - my bad - I was thinking dual boot Windows/Linux - which can be quite challengingThe timesync service which is part of VirtualBox Guest Additions is known to handle time zones correctly.
Re: 2FA on Microsoft Teams fails (wrong timestamp)
Problem seems to be solved.
Once again, the problem was Microsoft itself. They really made a mess with the accounts. Resetting the account completely solved the problem. Cannot completely explain it, 2FA was set to disabled and Microsoft was still asking for the code.
Once again, the problem was Microsoft itself. They really made a mess with the accounts. Resetting the account completely solved the problem. Cannot completely explain it, 2FA was set to disabled and Microsoft was still asking for the code.