Home › Knowledgebase › KB-548

How to set up and use a YubiKey hardware security key for Microsoft 365 MFA

Summary

This guide helps you troubleshoot and resolve: How to set up and use a YubiKey hardware security key for Microsoft 365 MFA. Follow the steps below to fix the issue.

Quick Tip: Need immediate assistance? 💻 Open a Ticket

Common Causes

A YubiKey is a small physical hardware token that plugs into your computer or connects via NFC to your phone. When paired with your Microsoft 365 account, it acts as a second factor at sign-in, replacing less secure methods such as SMS codes or authenticator app prompts. Because the key must be physically present and touched to authenticate, it is highly resistant to phishing and remote attacks, making it an excellent choice for small business owners and home office users who want stronger protection for their email, OneDrive and Microsoft 365 apps.

Before You Begin

If you only have one YubiKey, consider ordering a second one and registering both. A spare key prevents you from being locked out if your primary key is lost, damaged or stolen.

Register Your YubiKey with Microsoft 365

Step 1: Open the Security Settings Page

  1. Sign in to myaccount.microsoft.com using your Microsoft 365 work or personal account.
  2. Select Security from the left-hand menu.
  3. Choose Security options or Advanced security options, depending on your account type.

Step 2: Add a New Sign-In Method

  1. Scroll to the Ways to prove who you are section.
  2. Click Add a new way to sign in or verify.
  3. Select Security key from the dropdown list.
  4. Click Add.

Step 3: Set Up the YubiKey

  1. A new browser window will open. Choose between USB device or NFC device depending on your YubiKey model.
  2. Insert your YubiKey into a USB port on your computer, or tap it against the NFC reader if you selected NFC.
  3. Touch the gold contact on the YubiKey when it begins to flash. This confirms your physical presence.
  4. Create a memorable name for the key (for example, "Office Desktop YubiKey" or "Personal Laptop Key") so you can identify it later.
  5. Click Done to complete registration.
You will be prompted to set up a PIN for the security key on first use. Choose a PIN you will remember but that is not used elsewhere. Do not store this PIN in the same location as the physical key.

Sign In to Microsoft 365 Using Your YubiKey

  1. Go to the sign-in page for any Microsoft 365 service (such as Outlook, OneDrive or portal.office.com).
  2. Enter your email address and password as usual.
  3. When prompted for additional verification, select Use a security key.
  4. Insert or tap your YubiKey and touch the contact when it flashes.
  5. You will be signed in automatically.

Managing Your Registered Keys

You can register up to ten hardware keys on a single Microsoft account. To view, rename or remove existing keys:

  1. Return to myaccount.microsoft.com > Security > Advanced security options.
  2. Locate the key under Ways to prove who you are.
  3. Select Remove to delete a lost or decommissioned key, or click the entry to rename it.
Removing a security key takes effect immediately. If it was your only registered method and you still have access to the account, add a replacement key straight away to avoid being locked out.

Troubleshooting

The YubiKey Is Not Detected

Sign-In Loop or "Something Went Wrong" Error

Lost or Stolen YubiKey

  1. Sign in using one of your alternative methods (Microsoft Authenticator, SMS code or recovery code).
  2. Go to myaccount.microsoft.com > Security > Advanced security options.
  3. Remove the missing key from your account immediately.
  4. Register a replacement key as soon as possible.
If you lose your only YubiKey and have no other sign-in methods registered, recovery can be difficult. Always keep at least two registered methods on your account, and store a spare YubiKey in a secure location.

Key Works on One Computer but Not Another

Best Practices

Related Articles

If you have followed these steps and your YubiKey still will not register, or your account has become locked, open a ticket through the 220 support portal and our team will assist you.

Still Having Issues?

Need more help? If the issue persists after trying these steps, please open a support ticket and our team will assist you.

💻 Open a Ticket