Enroll with YubiKeys (HOTP)

Set up a YubiKey as your MFA method: UserLock programs the key, and you touch it at sign-in to enter the one-time code.

Published May 1, 2024

How YubiKey works with UserLock

A YubiKey is a hardware key made by Yubico. During enrollment, UserLock programs it with a one-time password (HOTP) secret. At sign-in, you touch the key and it enters the code for you.

Note

This guide uses the YubiKey as a USB token. If your organization asks you to use your YubiKey as a security key, follow Enroll users with a FIDO2 security key instead.

User prerequisites

  • A YubiKey with HOTP support, such as a YubiKey 5 NFC or another YubiKey 5 Series key.

  • Your domain credentials.

  • If you already use another MFA method, ask your administrator to reset your MFA configuration first.

⚠️ Important

A YubiKey has two slots: a short touch uses slot 1, a long touch uses slot 2. If you already use your YubiKey for other services, choose a slot that no other service uses.

Enroll your YubiKey

  1. Plug the YubiKey into a USB port of your computer. Enroll from a session opened directly on the computer, not through Remote Desktop.

  2. Sign in with your Windows credentials.

  3. When UserLock asks you to set up MFA, select USB Token.

  4. When UserLock detects the YubiKey and asks whether to use it for MFA, select Yes. If you select No, UserLock offers to set up an authenticator app instead.

  5. Select a slot, then select Link YubiKey.

    How UserLock MFA detects YubiKey
  6. UserLock programs the YubiKey without displaying the secret. Select Success to confirm.

  7. Touch the YubiKey: a short touch for slot 1, a long touch for slot 2. The 6-digit code is entered automatically, and you’re signed in.

  8. If UserLock asks you to set up an additional method, follow the on-screen instructions. If you can’t, contact your administrator.

Sign in with your YubiKey

  1. Plug the YubiKey into the computer you use. For a Remote Desktop session, plug it into your own computer.

  2. Enter your Windows credentials.

  3. When prompted, touch the YubiKey. The code is entered automatically.

  4. Select Verify and continue.

Once enrolled, you can also use your YubiKey for VPN and web application sign-ins.

Troubleshooting

“This code is invalid” after many offline sign-ins. The key’s counter can drift from UserLock’s. Contact your administrator.

Enrollment fails in a Hyper-V virtual machine. Enroll from your physical computer. You can then sign in to the virtual machine with your YubiKey.

You lost your YubiKey. Contact your administrator. If you enrolled an additional method or saved recovery codes, use them to sign in in the meantime.