For the past couple of weeks, I have been battling some issues on my Mac. Long story short, I had to reset my Keychain and that seems to have caused some unintentional issues for various things including OneDrive. (Side note: I had to reset my Keychain because of Office365 and enterprise single-sign-on issues – I believe this may be related to my OneDrive issues as well but that is unconfirmed). Anyway…during these few weeks, I had issues not only syncing my corporate and personal OneDrive accounts – yes, you can have two running at once – but sometimes OneDrive would just hang with an error message or two that I couldn’t seem to get rid up. But I found, after lots of trial and error on my end, a way that I believe is the easiest to reset OneDrive back to default so that you can get up and running again.
Note: this article was updated on 8/19/18 with a How To video. If the video is helpful, please share!
For those of you who are reading this saying, what is OneDrive? Well, it’s a file hosting service that allows you to synchronize files across devices. The most popular competitors are Dropbox, Google Drive, and Box. But this article is not about which one to use. It’s about how to reset OneDrive to a clean state so that you can re-syncronize it again.
Here are some errors that came up for me initially:
- OneDrive for Business complained that I was using an invalid character in the name of my folder (I wasn’t)
- OneDrive Personal was stuck in a “beginning to sync” stage immediately after logging in
- OneDrive login would simply hang after entering the password
- OneDrive would say it was connected but no files would synchronize
If you are reading this article, please leave a comment to let everybody know the error you were having.
Ready to try to fix your OneDrive sync issues? You need to probably reset OneDrive!
6/21/21 Update: If you are also using Microsoft OneDrive AND Time Machine, you will want to see my How To/Fix It article – they don’t always play nicely together!
Some Ways I Tried to Reset OneDrive
There are many different approaches you could try here. Some are easier than others. Some are more complete than others. I wanted to offer these as possibilities to try before doing the really easy way to reset OneDrive that I discovered on my own.
Here are a few things that I tried along the way. You may want to try these methods. It was a long process of trial and error. For me, because I have a feeling it was a bit more deep-rooted than just a corrupt app, I did many of these fixes together. But in the end, my OneDrive issue returned. Yours’ might not, though.
Here’s what you can try:
- Deleting the OneDrive app – you can do this and re-download but frequently, since you aren’t actually doing a reset of OneDrive, you are dumped back into the same problems.
- Killing the OneDrive processes – sometimes this can help. Just launching Activity Monitor and killing “OneDrive” and “OneDrive Finder Integration” process can help, but not always. Kill the processes and restart the app.
- Deleting Application Passwords from Keychain – this is another way to potentially reset OneDrive. But I found that it didn’t always work for me.
- Uninstall OneDrive completely – using an uninstaller app like CleanMyMac that fully removes the application, .plists, and related files. You can then download and install again.
- Repairing Permissions – note, you can’t really do this anymore with MacOS Sierra, but you can using tools like the free Onyx or the paid Sierra Cache Cleaner to do that and other actions.
How to Reset OneDrive for Mac the Easy Way
So remember, the following reset only works on a Mac. Windows issues are a different matter completely. Anyway, here are the high-level steps on how to reset OneDrive and then I will go into a bit more details.
Ready? Here we go:
- Launch Activity Monitor & Kill OneDrive processes
- Launch Keychain Access and delete OneDrive keys
- Open the secret reset OneDrive script
Yep, three easy steps. Let’s look at them a bit closer.
End OneDrive processes
The first thing you want to do is end all of the running OneDrive processes. You basically don’t want OneDrive running anymore. So go into your Utilities folder and launch Activity Monitor.
In there, I recommend that you sort the column alphabetically by “Process Name”. (Also, that helps prevent the list from hopping around.) Scroll down until you see OneDrive listed. There are usually two distinct OneDrive items you should quit: “OneDrive” and “OneDrive Finder Integration”.
You may actually see two instances of OneDrive listed if you are running both a Personal and Business version. Just highlight by clicking on each one and click on the X icon at the top. You are prompted to “Quit” or “Force Quit” the item. I would try using Quit first. If OneDrive doesn’t close, try Force Quit.
Close those two OneDrive items and move on to the next step.
Delete OneDrive Keys
Now that you have killed off OneDrive and any related running processes, you want to wipe out any other stored or cached user or password information that may be causing issues. In order to do this, you will need to go into the Keychain Access utility.
A bit of warning here. Keychain Access is a pretty powerful tool. It stores a lot of encrypted items like passwords, certificates, and information. Don’t randomly start deleting things in there.
In order to reset OneDrive, we just need to remove a couple of items from the Keychain Access utility. This utility is located in the Utilities folder.
Once Keychain access is open, you type in “OneDrive” in the search panel on the upper right. The search results could be a variety of items. Just make sure they are related to OneDrive.
You may see things like:
- Cached Credentials
- FinderSync
- HockeySDK
Select only the OneDrive related items and press delete. Then exit Keychain Access.
Don’t reboot. Just keep going. Ready for the final step?
Use the Secret Reset OneDrive Script
I found this script quite by accident actually. I was working with a completely unrelated application on something completely different and they said to look at the package contents of the application and use the uninstall script in there. So I started thinking…I wonder if the OneDrive developers put a reset script or application hidden within the OneDrive application itself. As I dug into it, I found it. And I used it. And it magically reset OneDrive so that I could start over from the beginning with the entering of my credentials.
Here’s how you access the Reset OneDrive script.
First, navigate to the OneDrive application. Then you Control-click the application. When you do that, you should see the following menu appear:
From that menu, select “Show Package Contents”. You will then see a list of folders and files within the OneDrive application. Note: don’t mess with things in here as it could break your application.
Within the “Contents” folder, scroll down to the “Resources” folder.
It is here in the Resources folder that I found the Reset OneDrive script. It’s called “ResetOneDriveApp.command”.
It’s not an application. It just a script that is run in the terminal. Note, when you run it, you may need to authenticate as an administrator.
To run the script, just double-click on it. It should launch Terminal and run through a variety of options. Once it has finished, you are done!
Once you have run the script (and already did the other 2 items earlier), you should be able to launch OneDrive as if it were a completely new installation. You should be prompted to enter your login information and start syncing. It worked for me!
UPDATED: Below is a How-To video on the processes described above. Note, OneDrive has been working flawlessly for me for quite a while so in the video, I don’t actually “do” any of my recommendations above, but I show you how to do them yourself.
Please let me know if this works for you in the comments below. It’s important to share experiences and other scenarios. Tell me and other what the issue was, what you have tried and what resolved or did not resolve it.
And if this fix worked, please share it on Twitter (and elsewhere)!
While these things can be tricky, sometimes it’s pretty easy to fix them. Just don’t panic!
HTD says: Fixing OneDrive syncing issues is actually pretty easy to fix if you follow the right process. And, if you use the secret reset OneDrive script that is hidden away.
32 Responses
Thanks so much for these suggestions. Before I attempt any of these, I wanted to find out if I’d have to start syncing everything from scratch again, or if it will pick up what’s been sync’d and continue from there? I’ve been having endless issues with OneDrive, and no answers from their support forum! My iMac seems to download files fine (when files have been added to my Macbook Air), however, it seems to be having issues uploading when I add the files to Finder to upload :( It’s killing me! I shouldn’t have moved away from Dropbox #BiggestRegret :(
Hi @@samanthaprinsloo:disqus – it really depends on how you have everything set up. I have reset my OneDrive before (but I had left the OneDrive directory intact on my HD). It just synched anything that it hadn’t synched previously. If you delete that older OneDrive directory, once you reconnect OneDrive, it will download everything you have stored in the cloud. You can, of course, do a “selective sync” and just check off the files/directories you want to download and sync. Hope that helps but feel free to ask more questions.
THANKS! Worked perfectly!
Hello Hightechdad
I was facing an interference between my former business OneDrive account and my personal OneDrive account (I retired 1 year ago).
My former business account surfaced again and proved difficult to eliminate.
And then… the ResetOnedriveApp script could overcome the trouble!
Many thanks for this VERY useful tip!
mate, i was about to throw my laptop into the wall, my wall and laptop thank you, may you have a great day
Thanks for the comment! So glad I saved your wall and laptop!
This how-to would help me greatly, but 11. Big Sur does not seem to support ‘Show Package Contents’ anymore. Or at least not the way you described here in 2018. Is there a way?
Your reply would be greatly appreciated,
Pieter
Hi Pieter – actually, I just tested the “Show Package” on Big Sur, and it does show up just fine. Be sure you are logged in as an administrator and have the rights.
Thanks much for this! I went from endlessly spinning pizza back to functioning OneDrive in a few minutes.
Hi Edwin! Thanks for the feedback and glad you got rid of the spinning beachball…er…pizza (haha). And I’m happy the tip still works!
Wowzers!! worked like a charm!! Thanks Michael you are a life saver!
“man walks out smiling….”
Hi Ryan! Thanks for the comment and glad it made you happy!
This appears to have worked for me too! So grateful and I have bookmarked this page! I’m with Matias – I too was about to throw my laptop against a wall! Thank you so much and many blessings!
OMG I love you! I was spending so much time trying to figure this out! You are a lifesaver!
IT. WORKED. Amazing!!!! Thank you
After a time machine restore to my new MacBook, OneDrive was the only app that didn’t play nice. Eventually, I found this post and after trying many things, blow me down if this wasn’t one that actually worked! Will look forward to revisiting this post in 4 years when I upgrade next ?
Hey Trevor – thanks for posting. So glad it still works!
I HAD to write to say a HUGE thanks. I’ve been having trouble and have probably wasted a week with MS Support (I have got other things to do!). I was trying to move all my data to my new work OneDrive and that’s when it all broke. Your fix was the only thing that seemed to make OneDrive behave again and it wasn’t suggested by MicroSoft either. Thank you, thank you, thank you!
Thank you so much for this! I’ve been struggling for a while and the reset command is just what I needed.
So happy that it still works as expected and thanks for the comment!
Hi, do you know why there is only “ResetOneDriveAppStandalone.command” in the Resource folder?
Hi Ann, Are you saying that the “ResetOneDriveAppStandalone.command” is the only thing in the “Resources” folder? You should have many other files. Also, this How-To article was written quite a while ago. I just checked the Resources folder on my M1 MacBook Pro and the “ResetOneDriveApp.command” no longer appears. It looks like it may have been replaced with the “ResetOneDriveAppStandalone.command” command script. Did you try running that script?
Hi Michael, thank you for the info. I tried reset it by running that script but now my personal one drive folder became (Archive), and it won’t sync to my desktop anymore. How can I retrieve it back from the (Archive)?
Thank you for this! It is exactly what I needed. I was getting error messages that I had two versions of One Drive on my computer and when I tried to follow the path to find the two versions I couldn’t launch the One Drive app. This fixed the issue and now when I go to save a document to One Drive it is only showing one account.
Hi Camron – thanks for the comment and I’m so happy that this fix still works for people!
this worked for me. Thank you! I had 2 work onedrives, one for my personal use and one for things on sharepoint (both are work folders). After following all the steps, both folders changed to say “archive”. Then, when I opened the onedrive application, it easily guided me through steps to sync my personal-workdrive. I had to go to sharepoint and choose which folders I wanted to sync one by one. But everything moved so much faster than it had been moving before everything got screwed up (I’m not sure what made things get messed up to begin with). i am going to need to look at the documents i was working on recently to see if the most updated versions are there, or whether i will need to pick them out of the “archive”. Thanks so much!!
Great, thanks for the run through. Sorted out the “jammed” onedrive on one of our users Macbooks. (running the reset script command)
Hello Adrian – I’m glad that the script still (hopefully) worked for you and thanks for the note back.
Hi Andrea, yeah, I have both work and personal OneDrives on one of my computers. As of late, it has been pretty good. Glad that this seems to have worked for you and you untangled things.
I can’t thank you enough for this. I had been trying to figure this out for MONTHS. Thank you thank you thank you.
You are a genius sir!!
No success. :( It seems that the appstore version of the application causes some bizarre issues. I spent more than an hour today trying to rid the appstore application completely and run the standard version. The standard version includes backup functions and apple wants users to buy their iCloud service, so that is stripped out of the appstore version. I was unsuccessful. So many errors at install or logging in. My client signed into her app atleast 35 times and I could not fully remove the app. It kept saying that there was another copy running when she would sign in and then it would crash/close.
So frustrating. I may spend more time trying to fix it but today I just reinstalled the appstore version so she could keep working.