OneDrive closes and won't login after PC rebuilds and reinstalling OneDrive

Paul Trice 0 Reputation points
2026-12-03T22:12:27.81+00:00

rebuilt PC several times in past 2 days from basic resets to full downloads and reinstalls, every time after the full hard drive wipe and reinstalling windows OneDrive will not allow me to log in. The OneDrive icon in the system tray shows as not logged in and if I click it and can manage to get the login window to open or if I try to open it from the start menu, which it won't always do, as soon as I enter my email address for my Microsoft account it shows as loading for a few seconds then the window closes and never logs me in. If I hover over the icon in the system it shows "OneDrive - Personal Not logged in", and after a few seconds more it will show "OneDrive - Personal Closing" then disappear for a second and comeback. every attempt to uninstall and reinstall OneDrive as well as the edgewebviewer2 have had no impact on this issue. my account is fine I can access it via the web, on a laptop and my phone, it's only my desktop PC that I just tried to rebuild that has this issue. OneDrive was working fine prior to the rebuild. Also, possibly unrelated but the one reset/rebuild option I can't seem to perform is the cloud rebuild, for some reason that one fails but doing a local reset or downloading windows then performing the rebuild or creating a bootable USB allows me to rebuild and reinstall windows.

Microsoft 365 and Office | OneDrive | For home | Windows

3 answers

Sort by: Most helpful
  1. Jeronimo Fuerte 50,265 Reputation points Independent Advisor
    2026-12-04T01:55:26.1533333+00:00

    I would recommend investigating whether OneDrive is experiencing an application crash during authentication.

    Please press Windows + R, type perfmon /rel and press Enter. This will open Reliability Monitor. Attempt to sign in to OneDrive again, refresh Reliability Monitor, and check whether a critical event associated with OneDrive or Microsoft Edge WebView2 appears. If so, select View technical details and share a screenshot showing the faulting module and exception code.

    Additionally, I would recommend creating a temporary local Windows user account under Settings > Accounts > Other users > Add account and attempting to sign in to OneDrive from that profile.

    https://support.microsoft.com/windows/security/identity-signin/manage-user-accounts-in-windows

    Was this answer helpful?


  2. Newsovan Sky 0 Reputation points
    2026-12-03T22:22:09.3333333+00:00

    wsreset.exe

    Was this answer helpful?


  3. AI answer

    2026-12-03T22:13:38.2833333+00:00

    Reset OneDrive’s local state and cached pre-sign-in configuration rather than reinstalling Windows or OneDrive again.

    1. Reset OneDrive completely

    Resetting disconnects the sync relationship and rebuilds OneDrive’s settings, but it does not delete files stored online.^1^

    1. End Microsoft OneDrive in Task Manager if it is repeatedly closing and reopening.
    2. Press Windows+R, enter:
    wsreset.exe
    
    1. After the Microsoft Store opens, close it.
    2. Press Windows+R again and run:
    %localappdata%\Microsoft\OneDrive\OneDrive.exe /reset
    
    1. If Windows cannot find that path, try:
    C:\Program Files\Microsoft OneDrive\OneDrive.exe /reset
    
    1. Wait one or two minutes. Open Start, search for OneDrive, and launch the desktop app.
    2. Enter the personal Microsoft account address and check whether the sign-in window now remains open.

    2. Clear OneDrive’s pre-sign-in cache

    If the window still closes after the email address is entered:

    1. End OneDrive.exe again in Task Manager.
    2. Press Windows+R.
    3. Enter:
    %localappdata%\Microsoft\OneDrive\settings
    
    1. Delete PreSignInSettingsConfig.json.
    2. Start OneDrive and try signing in again.

    Microsoft documents deleting this file as the Windows procedure for clearing OneDrive’s cached credential configuration.^2^

    Do not perform another standard uninstall/reinstall first; that has already failed and may leave this per-user configuration untouched.

    3. Test for machine or network filtering

    The failed cloud recovery may be unrelated, but together with OneDrive’s authentication failure it makes a network-path test worthwhile.

    1. Disconnect any VPN or third-party web-filtering/security software temporarily.
    2. Connect the desktop to a phone’s mobile hotspot instead of the normal router.
    3. Start OneDrive and attempt the sign-in.

    Microsoft specifically recommends a mobile hotspot test when OneDrive cannot connect, because a firewall or internet provider can block the connection even when ordinary web browsing works.^3^

    • If sign-in works on the hotspot: inspect the router, DNS filtering, firewall, or security product on the normal connection. Consumer OneDrive requires its documented authentication and storage hosts over TCP 80 and 443.^4^
    • If it also fails on the hotspot: the fault remains local to this Windows installation rather than the Microsoft account or normal home network.

    4. If the hotspot also fails

    Install all available updates under Settings → Windows Update, including pending restarts, and then retry. Microsoft also recommends using the latest OneDrive version for sign-in problems.^5^

    If OneDrive still closes, contact Microsoft Support from the Personal accounts → Technical support section of the OneDrive sign-in support page. Include:

    • Windows version and build
    • OneDrive version
    • Exact time of a failed sign-in attempt
    • Whether the hotspot changed the result
    • That web, phone, and laptop access work
    • That OneDrive/WebView2 reinstalls and multiple clean Windows installations made no difference
    • That Windows cloud recovery also fails

    Avoid another PC reset until the network test and local reset/cache steps are completed; the existing local and USB rebuilds already show that another identical reinstall is unlikely to add useful diagnostic information.


    References

    1. Reset OneDrive | Microsoft Support
    2. Clear OneDrive cached credentials | Microsoft Support
    3. Can't sign in to OneDrive | Microsoft Support
    4. Required URLs and ports for OneDrive
    5. Fixes or workarounds for recent issues in OneDrive
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.