Onedrive (corporate) - change location?

Soldato
Joined
20 Oct 2002
Posts
18,544
Location
London
My employers moved us over to O365 and Onedrive ages ago. I currently have a separate Onedrive folder sitting on my Mac with nothing in it, unused. I'd like to change my Documents folder to be my Onedrive folder so that everything in my Documents is backed up and accessible on my work phone etc.

I'm not sure if corp security has locked this down or something, but i cant figure out how to do this? :confused:
 
Huh, there doesn't seem to be a place where you can change it (it asks during install). Unlink the account and re-login and it will ask where you want to put it. I'm curious if this works, I expect it won't for some reason.
 
You should be able to change the OneDrive default location, after setup, through user preferences but there's a good chance your corp. will be managing Office user preference keys if they're using any form of MDM (Jamf, Intune etc), so changes might not be persist and if it's the standalone version, location changes can be disabled (iirc).

But purely for reference, and if it's standalone version (App Store differs slightly), you should be able to change it via cli/Terminal using (fully close OneDrive first before deploying the command) -
Code:
defaults write com.microsoft.OneDrive DefaultFolderPath -string "~/Documents"
Where "~/Documents" is the PATH your want to set it to.

And to read it (worth doing this first in case you need to revert) -
Code:
defaults read com.microsoft.OneDrive DefaultFolderPath


And it's worth having a read of the Macadmins (https://macadmins.software) site and the MS Office preference list (https://docs.google.com/spreadsheets/d/1ESX5td0y0OP3jdzZ-C2SItm-TUi-iA_bcHCBvaoCumw/edit#gid=0) as well as info around the defaults cli command (https://pawelgrzybek.com/change-macos-user-preferences-via-command-line/) and/or editing the Office .plist file directly (https://docs.microsoft.com/en-us/onedrive/deploy-and-configure-on-macos).

Obviously, use at your own risk as some of the MS Office preferences can butcher an install.
 
Last edited:
Hi @visibleman thanks for the info there. They do use jamf and lock everything down pretty heavily so I'm thinking that is a no-go. I'll have to give IT support a shout and see if they can do it for me. I don't know why they didn't set our Documents folder as the default in the first place?
 
Hi @visibleman thanks for the info there. They do use jamf and lock everything down pretty heavily so I'm thinking that is a no-go. I'll have to give IT support a shout and see if they can do it for me. I don't know why they didn't set our Documents folder as the default in the first place?

You probably could change it and the change would stick as they most likely aren't actively managing OneDrive's preferences and someone just ran through the defaults for setup.
But as you say, give them a shout as there maybe an legitimate reason for it.
 
Cant just move your documents location to the onedrive folder?
I was debating that but it seems a bit 'wrong' to my OCD :p Now that I've been looking at doing this I wonder if there's any downside for having my whole Documents on Ondrive? I mean nothing is shared until I do so right? I would be helpful to automatically have access to everything on my phone etc without thinking about it..
 
I mean nothing is shared until I do so right?

Correct.

I would be helpful to automatically have access to everything on my phone etc without thinking about it..

It's very useful for me, plus being able to get at documents on any computer with internet access has come in useful too.

I'd like to change my Documents folder to be my Onedrive folder so that everything in my Documents is backed up and accessible on my work phone etc.

Putting your data into OneDrive isn't a backup unless your company uses a tool that takes a backup of OneDrive data. Microsoft don't take backups.
 
Back
Top Bottom