OneDrive for Business Default Folder Location

Kennedy
New Contributor II

Hi all!

Has anyone out there managed to script the location of the OneDrive for Business folder for users?

I've tried to follow the MS documentation here. Specifically the following lines of code:

/usr/libexec/PlistBuddy -c "Add :Tenants:my_tenant_id" ~/Library/Containers/com.microsoft.OneDrive-mac/Data/Library/Preferences/com.microsoft.OneDrive-mac.plist
/usr/libexec/PlistBuddy -c "Add :Tenants:my_tenant_id:DefaultFolder string '<PathToFolder>'" ~/Library/Containers/com.microsoft.OneDrive-mac/Data/Library/Preferences/com.microsoft.OneDrive-mac.plist

I'm not having any luck running those. The first command spits out "Unrecognized Type:".

Any thoughts out there?

Cheers,
Gavin

7 REPLIES 7

jleomcdo
Contributor

I was just looking into this the other day.
Looking at https://support.office.com/en-us/article/Deploying-the-OneDrive-Next-Generation-Sync-Client-on-OS-X-and-configuring-work-or-school-accounts-eadddc4e-edc0-4982-9f50-2aef5038c307 talks about "This setting is configured using a nested dictionary in the preferences plist for OneDrive.app. The outer dictionary ("Tenants") contains key/value pairs of tenant IDs (the key), and a dictionary of specific settings for that tenant (the value):" Notice it says "the outer DICT..."
Below is the command I tried, which kind of worked. At least it put the entry into the plist file without any errors. But when I test it out OneDrive, the setup wizard, still ask me choose a location for the OneDrive folder. :(

/usr/libexec/PlistBuddy -c "Add :Tenants:xxx-xxx-xxxx-xxxxxxx-xxx dict" ~/Library/Containers/com.microsoft.OneDrive-mac/Data/Library/Preferences/com.microsoft.OneDrive-mac.plist
*This is all one line. Of course you need to replace xxx-xxx with your GUID.

The 2nd command seems to go into the plist without any problems.

Maybe this will help you out. If you get it to work, let me know.

Kennedy
New Contributor II

I've managed to get the commands working, and the plist now looks as it should - thanks for your help there.

But like you, those settings in the plist don't seem to do anything, I still get prompted for the OneDrive location.

Any one out there have any luck with this?

miawri
New Contributor

Not me.

Tried it with the latest client as we want to standardise where the ODfB folder lives.

The setup still doesn't skip the 'This is your OneDrive folder' page.

Annoying that the actual plistbuddy command is still wrong in the documentation too.

a_simmons
Contributor II

Has anyone had any luck with setting the default OneDrive location?

timlarsen
Contributor

Hey sorry to resurrect an old thread, but wanted to chime in I also tried to accomplish Microsoft's process to set a default folder for OneDrive and also had no success getting said preference to set. Can I ask: has anyone had luck with this in the last few months or come up with any workarounds? Also (if I may ask) what default folder location are you trying to set...and how are you typing this out in the plistbuddy command? Then after the preference domain is configured correctly, are you uploading the plist into a custom profile payload and using User or Computer level settings in the JSS?

Thanks!

mark_mahabir
Valued Contributor

There are regular conversations around this on the #onedrive channel of the MacAdmins Slack.

If you're not yet on there, you can sign up via https://macadmins.herokuapp.com/

donmontalvo
Esteemed Contributor III

In case you're deploying the OneDrive stand alone package, Microsoft has a KB on these settings.

--
https://donmontalvo.com