How do I delete OneDrive from system tray for a closed business account?

Jonathan Carter 30 Reputation points
2023-01-18T16:51:42.4333333+00:00

Last week I closed a Microsoft 365 account for business, but the OneDrive icon in the system tray for this closed account will not disappear and keeps asking me to log into the account. Again, this account does not exist anymore so I cannot log into the account or its settings. This happens on both my Windows desktop PC and Windows laptop PC. I've already removed the work/school account from Windows on both devices, uninstalled/reinstalled OneDrive on both devices, and attempted to find a resolution through the troubleshooters. FYI, I have one personal account and two other work/school accounts remaining on both PCs, all which continue to sync properly. So, what can I do to fix this OneDrive problem with my closed account? Thank you in advance for your help!

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
809 questions
OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,121 questions
0 comments No comments
{count} vote

Accepted answer
  1. Emily Hua-MSFT 27,526 Reputation points
    2023-01-19T06:22:50.89+00:00

    Hi @Jonathan Carter

    Generally, we need to unlink the OneDrive account before you close the Microsoft 365 Account, as this action needs you login to OneDrive.

    Currently, I would suggest you try following steps, but serious problems might occur if you modify the registry incorrectly. Before you modify it, please remember to back up the registry for restoration in case problems occur.

    If you do not want to modify the registry keys, please create a new local administrator account.

    • Exit OneDrive by right clicking on the OneDrive icon > Click Exit or Quit OneDrive.
    • Open the Registry Editor by searching regedit > OK.
    • Navigate to HKEY_CURRENT_USER > Software > Microsoft > OneDrive > Accounts > BusinessX.
    • "X" is the amount of Business accounts that you have logged into previously. Find the specific one by looking at the UserEmail value. After you found the correct one, delete the entire folder (BusinessX).

    Capture28

    • Navigate to HKEY_CLASSES_ROOT > CLSID. Inside the folder, search (CTRL + F) to find keyword: OneDrive.

    Find next until you find one that has the "OneDrive – xxx" as the Default value and looks something like the screenshot below:

    Capture30

    Delete the string subfoler.

    • If there is local OneDrive folder of the account in Windows File Explorer, please back up the files you need in this folder.
    • Then locate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace, expand this folder, there will be subfolders with key names of a long string as above.
    • Find the one includes (Default) with “Onedrive - xxx” in right “Data” column, delete the string subfoler.

    Capture29

    • Go to C:\Users\<User Name>\OneDrive - xxx, deleate it.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Jordan Millama 1,291 Reputation points
    2023-01-18T17:21:15.57+00:00
    1. In the system tray, right-click on the OneDrive icon and go to Settings
    2. Under the Account tab, click Unlink this PC for the desired OneDrive account you'd like to remove.

    User's image


    Please accept as an answer if this was helpful.

    0 comments No comments