Share via

I cannot connect to Microsoft Onedrive on my new machine

Glen Spencer 0 Reputation points
2026-03-30T14:58:18.9333333+00:00

When I try to login to Microsoft Onedrive on a new PC I've just installed it asks for a PIN, which I've never set up. And now I've been locked out (attack mitigation). Please help me.

Microsoft 365 and Office | OneDrive | For home | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Gunasekar N 65,040 Reputation points Independent Advisor
    2026-03-30T15:45:29.93+00:00

    Hello, thank you for reaching out to Microsoft Q&A.

    When you go to Start > Settings > Accounts > Sign-in Options > PIN (Windows Hello).

    Do you see the option - Change PIN? (or) Select 'I forgot my PIN' option and follow the prompts to replace the security information.


    Once changed, launch the OneDrive desktop app.

    Sign in with your Microsoft account.

    If it asks for a Windows Hello PIN, enter the new PIN you changed.

    Let me know if you still need more help.


    0 comments No comments

  2. Q&A Assist
    2026-03-30T14:58:44.9133333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Follow these steps to regain access and connect OneDrive on the new PC:

    1. Confirm the Microsoft account works
      First, verify that the Microsoft account itself (email and password) is valid and not locked:
      • Sign in to the Microsoft Account dashboard.
      • If sign-in fails, use the guidance under Can't sign in to recover the account or reset the password as needed.
    2. Check if the Microsoft account is locked
      If the account was locked due to suspicious activity (attack mitigation), the sign-in flow may not show the usual Next or may block further steps:
      • When prompted during sign-in, look for a link beginning with aka.ms/ and follow it to submit the account unlock form.
      • After submitting the form, wait for the Microsoft Online Safety support agent to review and respond by email. Avoid submitting multiple requests, as this can delay processing.
    3. Fix OneDrive sign-in issues on the PC
      Once the account is confirmed active/unlocked:
      • Make sure the latest OneDrive sync app is installed. If needed, download the latest version from the OneDrive download page.
      • If OneDrive shows as not connected or cannot sign in, restart OneDrive from Start (Windows) by searching for OneDrive and launching it again.
      • If sign-in still fails, check whether a firewall, VPN, or internet provider is blocking access to Microsoft 365 services. Temporarily disconnect from VPN or test from a different network (for example, a mobile hotspot). For detailed network requirements, see Required URLs and ports for OneDrive.
    4. Handle the PIN prompt on the new PC
      The PIN being requested is a Windows Hello sign-in PIN for the device, not a separate OneDrive PIN. If the PIN setup is failing or looping and preventing access to the desktop where OneDrive can be configured:
      • From the Windows sign-in screen, use the password option for the Microsoft account instead of PIN, if available.
      • If the PIN flow is stuck and the password is not accepted, use Windows Recovery Environment (WinRE) to create or enable an alternate admin account, sign in with that account, and then remove or reset the problematic PIN for the main account (for example, by deleting the NGC folder as described in the moderator’s guidance). After that, sign back in with the main account and set up Windows Hello PIN again if desired.
    5. If still unable to sign in to OneDrive
      If OneDrive continues to report that it cannot sign in or connect after the above steps:
      • Follow the OneDrive “Can’t sign in” troubleshooting: confirm username/password via the Microsoft Account dashboard, ensure the latest OneDrive client, and verify network/firewall/VPN settings.
      • If the issue persists, use the Contact Microsoft Support path from the OneDrive support article to reach technical support, describe that the account was locked due to attack mitigation and that OneDrive sign-in on a new device is blocked by a PIN/connection issue.

    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.