One Drive for Business Client is here!!

BOBW
Contributor II

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!!

59 REPLIES 59

mbezzo
Contributor III

Hi @cbrewer I'm wondering if you've found any clever method of firing off your plist edit script after your Self Service VPP installs. I'm struggling with how to do this right now. I can have techs manually run each self service policy in order on newly deployed machines, but I'm worried about all the existing users. Having them run each policy in order is gonna be a nightmare! :)

And yes, definitely feature requesting a way to at least trigger a policy if not bundle scripts in with the VPP self service items!

Thanks,
mbezzo

mbezzo
Contributor III

FYI, looks like a Feature request was created for this: https://jamfnation.jamfsoftware.com/featureRequest.html?id=2862

BenDenham
New Contributor

@sgoetz The Finder extension for OneDrive when enabled allows you to see the little ticks and crosses on the files/folders.

You can drag the OneDrive @ Business folder to the sidebar and it will stick.
Once the finder is reloaded the sidebar will also display OneDrive as a cloud icon rather than a folder.

myronjoffe
Contributor III

Can anyone confirm if One Drive currently supports an on-prem solution?
@fritz.schlapbach back in December said it doesn't...

myronjoffe
Contributor III

Anyone?

Josh_Smith
Contributor III

I've benefited from this thread so I thought I'd post back what I've come up with for configuring OneDrive for Business, in case it helps anyone else:

I used this plist used to create a Custom Config profile in the JSS to:
-Enable OneDrive for Business
-Block Personal OneDrive
-Allow user to add account
per MS Documentation

Preference Domain: com.microsoft.OneDrive-mac

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>DefaultToBusinessFRE</key>
    <true/>
    <key>DisablePersonalSync</key>
    <true/>
    <key>EnableAddAccounts</key>
    <true/>
</dict>
</plist>

Launch Agent to open OneDrive at every login for every user, placed in /Library/LaunchAgents

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.merrill.LaunchOneDrive</string>
    <key>Program</key>
    <string>/Applications/OneDrive.app/Contents/MacOS/OneDrive</string>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

This is a portion of a script to enable the OneDrive Finder Extension and add OneDrive to user's sidebar using mysides . This script is called by a LaunchAgent that is installed into each user's ~/Library/LaunchAgents (and the user template), then the LaunchAgent for that user is deleted at the end of the script so it only runs once for each user.

loggedInUser=`python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");'`

pluginkit -e use -i com.microsoft.OneDrive-mac.FinderSync

/PathToMySides/mysides add OneDrive file:///Users/$loggedInUser/YourOneDriveDirectoryName

rm ~/Library/LaunchAgents/com.YourLaunchAgentName.plist

gachowski
Valued Contributor II

@Josh.Smith

Thank you and I will be using your Custom Config profile : ) : )

C

wmateo
Contributor

@Retrac did you ever figure out the open at Login? might just use it as a launch agent

Kennedy
New Contributor II

Did anyone manage to script the default folder location for OneDrive using PlistBuddy as per MS documentation? Or via some other way?

Retrac
Contributor

Unfortunately we are not going down the 365 path @wmateo so my development of using OneDrive has come to a halt.

Josh_Smith
Contributor III

@wmateo I couldn't figure out how to manage the Open at Login functionality in the App and just created a Launch Agent. I looked through all of the plists and tried running captures with Composer (new and modified as well as monitor file system) to pickup the change, but couldn't track it down.

I can't think of a use case where a user would need to disable it, so I was ok with overriding the setting in the GUI. The app launches at login regardless of the app setting now....if there is no network connection OneDrive just sits quietly waiting for one.

dstranathan
Valued Contributor II

Does anyone know if OneDrive for Mac works with on-premises (local) storage and SharePoint?

bpavlov
Honored Contributor

Just a heads up. A member of the OneDrive team has joined the #microsoft-office channel on Slack.
http://macadmins.org

itupshot
Contributor II

@Josh.Smith On your menubar, click the OneDrive applet, and go to Preferences:
3ae9eb8d51cb46b2871983e036be7c0b

However, I do like your idea of just creating a LaunchAgent that goes in /Library.

As everyone else, I haven't found a way of skipping the folder location screen.

wmateo
Contributor

@Josh.Smith you mind sharing the full script? I want to automate adding one drive to sidebar once i deploy one drive

Josh_Smith
Contributor III

@wmateo Sure, that's actually the full script (minus some some comments/versioning/logging, I added the comments back below), then I run it with a LaunchAgent so it runs as the user. There probably should be logic in the script to check for existing conditions....but that wasn't really necessary the way we were using it at the time so I never developed it further.

Script:

#!/bin/sh
loggedInUser=`python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");'`

#enables Finder Extension for current user
pluginkit -e use -i com.microsoft.OneDrive-mac.FinderSync

#adds OneDrive to end of current user's Finder SideBar
/PathToMySides/mysides add OneDrive file:///Users/$loggedInUser/YourOneDriveDirectoryName

#Delete the LaunchAgent for this User so it doesn't run at every login
rm ~/Library/LaunchAgents/com.company.OneDriveFinderPreferences.plist

LaunchAgent:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.company.OneDriveFinderPreferences</string>
    <key>Program</key>
    <string>/pathToScript/OneDriveFinderPreferences.sh</string>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

wmateo
Contributor

@Josh.Smith Thank You, how is this working for you? Fully Automated? script adds OneDrive folder to the Finder Sidebar?

Josh_Smith
Contributor III

Yes fully automated, adds OneDrive to sidebar at next user login. I ran it as part of a self service policy that installed OneDrive. The user has to log out and back in to get the launch agent to run....I think I did it that way because we had a reboot in the policy anyway. You could probably modify it to run directly for one user instead of taking the LaunchAgent approach if desired.

wmateo
Contributor

@Josh.Smith This was very helpful. Thank You!!!!

KyleEricson
Valued Contributor II

I just want a script to enable the Finder Extension for the current user. Does this need to go into the Launch Agent?

Read My Blog: https://www.ericsontech.com