Skip to main content

Just thought you all might like to know it is finally here:



https://support.office.com/en-us/article/Get-started-with-the-OneDrive-for-Business-Next-Generation-Sync-Client-on-Mac-OS-X-d11b9f29-00bb-4172-be39-997da46f913f?ui=en-US&rs=en-US&ad=US



https://support.office.com/en-us/article/Get-started-with-the-OneDrive-for-Business-Next-Generation-Sync-Client-on-Mac-OS-X-d11b9f29-00bb-4172-be39-997da46f913f



make sure you run those commands as in website:
defaults write com.microsoft.OneDrive-mac DefaultToBusinessFRE -bool True
defaults write com.microsoft.OneDrive-mac EnableAddAccounts -bool True



Download App from app store, fix Mas_reciept, drop into composer, grab the plist from :
/Users/*/Library/Containers/com.microsoft.OneDrive-mac/Data/Library/Preferences/com.microsoft.OneDrive-mac.plist



FUT, FEU



and away you go!!

Finally!



Ran into a problem pretty much straight away though; seems like they can't handle umlauts in the organization name. Got a lovely u00f6 instead of an รถ in the sync folder name.


Nice. But unfortunately (and to be honest I'm not really surprised) it does not support connecting to on-premises SharePoints. To add this feature it will take another year I guess. Would have been a nice Christmas present.


New to deploying from app store...what do you mean by fix Mas_receipt?


Sorry. but this is not new. It's been available since late September


@ooshnoo Funny that, when you go to app store it shows updated 17th December....



@jhuls Have a look at this:
https://jamfnation.jamfsoftware.com/discussion.html?id=11816


We had been testing this out over the past few months. The main problems were it not working (at least for us) on 10.11 and the App store version being for personal accounts only. The business version would crash immediately after logging in on El Cap.



We tested the Beta version a few weeks ago and it worked ok.



This is the first App Store version I've seen that works on 10.11 and with a business Office365 account.


Is Microsoft planning on releasing this only through the App Store does anyone know?


@davidacland Had the same experience testing the before 17.3.6296 version as well. Glad to see we have a working 10.11 version


Anyone know how the client is setting 'Open at Login'?



The com.microsoft.OneDrive-mac plist does't change when the option to open at login is ticked.



com.microsoft.OneDrive-mac as a config profile to set DefaultToBusinessFRE and EnableAddAccounts works a treat though.


@c0up3 when you use the method of fixing the Mas_receipt and dropping into Composer, will future app updates work on the client machines? I'm being asked to deploy this without using personal Apple ID's - I know with Casper 9.82 and 10.11 there is device based VPP but we are not quite there yet...any suggestions out there?


@mapurcel sorry for the late reply, been off on holidays 🙂
We are looking at getting VPP kicked off so I don't have to manage the MAS_Receipt files, but as far as I know it should never prompt for a update when using a blank MAS_Receipt file, anyone correct me if I am wrong. I force all App store updates to all machines when they come out at this time.



I have found if I leave the updating to the staff they will never update, and not having their Apple ID/passwords I cannot force the update. So.... its either manage the apps and keep them up to date or leave it to staff who only about 10% will update themselves.



Could make a policy to force prompt users but then they would only complain about something coming up while they were working....


I am quite new to the Composer and to the whole Mac OS X environment.



What would be the most efficient way to create a PKG with composer with i.e. shell script which applies the commands (shown below) after the installation?



defaults write com.microsoft.OneDrive-mac DefaultToBusinessFRE -bool True
defaults write com.microsoft.OneDrive-mac EnableAddAccounts -bool True



I already did preliminary tests with grabbing the onedrive.app from App Store while snapshot was running and added afterwards post install script (shell) with the lines mentioned above.



I did a test install in on a fresh Mac OS X, but seems it did not apply the needed lines automatically as it still goes to the wrong log-in screen (Not for business environment)


Hi, it will be running the commands as root so the commands will be getting written into the wrong preference domain.



You can script to write the setting into the users home although a custom configuration profile to set these two keys might be a better route.


Hey,



Thanks for the response. I am currently just using JAMF Composer to test it out so I don't think I am able to use custom configuration profile. Would you happen to have an example script how this would go?


@Xerendor There's a couple of things to note here:
1. I would avoid using a snapshot to capture Mac App Store apps. Doing this will result in you grabbing the _MASReceipt which will tie it to the Apple ID you used to download the app which means the end user will be prompted for credentials for that Apple ID when the app needs to be updated.



Instead, look at the Apple supported method of using VPP to deploy apps. Read here: https://support.apple.com/en-us/HT202995 and http://www.jamfsoftware.com/solutions/education/volume-purchase-program/



Or you can go with this method: [ttp://derflounder.wordpress.com/2013/08/22/downloading-apples-server-app-installer-package/](ttp://derflounder.wordpress.com/2013/08/22/downloading-apples-server-app-installer-package/). For most apps this method alone will work fine as there will not be a _MASReceipt and the app will launch normally. However, there are some apps which will require a _MASReceipt file and for this you can (at the moment create a dummy _MASReceipt) with a simple line like this:



touch /Applications/MyGreatProgram.app/Contents/_MASReceipt/receipt


Sure, you'll have a few people tell you that you shouldn't use this method, but to me this method is much cleaner than capturing that _MASReceipt and having confused users getting prompted for credentials. Sure, some admins tell you that they will know when the update is available and package up asap, but that doesn't cover situations where a user may not be in range of the JSS to get that latest app update pushed.




  1. User context is always key when writing scripts and using context aware commands. If you do not specify anything, "defaults" will automatically write or read from the current user's preferences. If you want to write to a specific place, then you will need to make sure that command is run as the user or specify the exact path where you want to read from/write to. However, even if you write to a specific path, be aware that the file will be written by account running the command which can lead to wrong permissions on the file.



For example, if root runs:



defaults write /Users/regularuser/Library/Preferences/com.microsoft.OneDrive-mac DefaultToBusinessFRE -bool True


then the file will be written correctly, but the permissions on the file will have the owner as root instead of "regularuser" which means the preference will never get read correctly. So you would have to include an extra command to correct ownership on the file like this:



chown "username" /Users/regularuser/Library/Preferences/com.microsoft.OneDrive-mac.plist


Another caveat to keep in mind is that certain apps that are sandboxed will have their preferences located within /Users/username/Library/Containers/........ so you really have to be aware if you are specifying a path where the app stores them as well. However, if you run the defaults command in the correct user context, it will know which preference file you are referring to and should write to it accordingly making the last two points about permissions and knowing the path kind of moot (at least the last time I've read this was the case, but I could be mistaken that it's aware of the differences between sandboxed and non-sandboxed apps).



With that all said, when possible I always attempt to use a custom configuration profile as @davidacland alluded to and only resort to the method I just previously described when only when necessary.



A custom configuration profile can be created by uploading a custom plist file to the JSS. Go to JSS > Computers > Configuration Profile > Click on "New" > Click "Custom Settings" payload > Upload PLIST.



Alternatively, you can use MCXtoProfile: https://github.com/timsutton/mcxToProfile and upload the resulting .mobileconfig file.
Go to JSS > Computers > Configuration Profile > Click on "Upload" to upload that custom config profile.



The PLIST you want to upload or that you use to create the custom config profile needs to have the exact settings you want to manage. Do not include values you do not want to manage as you may end up with less than desirable results. In other words, it will manage and force those values on the user which you won't necessarily want.



I hope this post helps you get a better understanding of your options and how to tackle them.


Anybody get this automated yet?



I couldn't get



"defaults write /Users/regularuser/Library/Preferences/com.microsoft.OneDrive-mac DefaultToBusinessFRE -bool True"



and I can't find where writes too...



defaults write com.microsoft.OneDrive-mac DefaultToBusinessFRE -bool True
defaults write com.microsoft.OneDrive-mac EnableAddAccounts -bool True


I have it working. Here's my Self Service script.



#!/bin/bash

if [ ! -d /Applications/OneDrive.app/ ];then
echo "OneDrive app not installed"
exit 0
fi

defaults write /Users/$3/Library/Preferences/com.microsoft.OneDrive-mac DefaultToBusinessFRE -bool True
defaults write /Users/$3/Library/Preferences/com.microsoft.OneDrive-mac EnableAddAccounts -bool True
chown $3 /Users/$3/Library/Preferences/com.microsoft.OneDrive-mac.plist
open /Applications/OneDrive.app/

@cbrewer



Thanks for helping out!!!



I was hoping to have the preferences there before the app was installed : ) : )



C


Hi @cbrewer ,



would you please share how do you package the onedrive app? the script that you share, is that a separate policy?



thanks


I didn't package the app. I purchased (they are free) managed VPP licenses for the app. If you're on Casper 9.82 you can assign device based licenses. This makes it a painless install via Self Service, at least for 10.11 Macs.



I do wish that when you deployed Mac App Store apps in Self Service you could tie in scripts and what not like with a policy. Feature request I guess...


Hey Everyone,



Its great that @cbrewer has got it to run and install,
My next question is, has anyone got it to auto discover the login details for the user?
If they were to login into the computer which is on the domain and set up their email, Is there a way for that the OneDrive For Business will set everything up and login and they wont have to touch anything?



Cheers


Anybody able to get this part working? from 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?ui=en-US&rs=en-US&ad=US



*Set the default location for the local "OneDrive - {tenant name}" folder



This setting allows you to set a specific path as the default location of the OneDrive folder when users configure their work or school account. If you do not enable this setting, the local "OneDrive - {tenant}" folder location will default to the user's home directory.



Because this setting is tenant-specific, you need your tenant ID. 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):



Tenants = {
"{tenant ID/GUID}" = {
{tenant-specific preferences}
}
}
To assist with configuring this nested dictionary of settings, the following examples demonstrate how to do this using the PlistBuddy command line utility.



First, execute this command (where <TenantID> is substituted with your tenant ID):



/usr/libexec/PlistBuddy -c "Add :Tenants:<TenantID>" ~/Library/Containers/com.microsoft.OneDrive-mac/Data/Library/Preferences/com.microsoft.OneDrive-mac.plist
Followed by this command:



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


@cbrewer how are you deploying this besides self service? I am looking to have this as a package, and post install script so that my techs can deploy to users via casper remote, as well as a policy which you did with the SS approach.


I'm only deploying via Self Service right now. You can try the install automatically method or you could go with this older method where you grab the installer as it comes down via App Store. My goal is to move toward device based licensing for Mac App Store apps where I can.


@cbrewer Thanks! I am trying your script now and it's failing at the chown command,


Reply