Skip to main content

Hi

I am looking for a best practice way to move from a MS Office Mac App Store Installation to MS Office PKG Installation.

We have currently some Clients with MS Office from the Mac App Store, those Clients shoul get MS Office via PKG Installation in the future.

Can we simply remove the MAS MS Office Apps from the Clients and replace them with the PKG MS Office Apps?

Thanks in advance.

Yes, the migration is as simple as pushing the package version from Jamf. A Single policy deploying a script to remove the app before the package to install the app runs is best.

 

Also configure Microsoft Auto Updater (a Configuration Profile) if you have not done so already or use Jamfs Mac Apps to manage updates and you can pretty much forget office is there.


Yes, the migration is as simple as pushing the package version from Jamf. A Single policy deploying a script to remove the app before the package to install the app runs is best.

 

Also configure Microsoft Auto Updater (a Configuration Profile) if you have not done so already or use Jamfs Mac Apps to manage updates and you can pretty much forget office is there.


Does this also work for OneDrive?

PKG Outlook can use the data from the previous MAS Outlook without any issues?

So I simply have to stop the MAS Office Distribution in Jamf, run a script to remove the MAS Office Apps on the target Clients and then run the Office PKG Installer on the Clients?

Thanks!


Does this also work for OneDrive?

PKG Outlook can use the data from the previous MAS Outlook without any issues?

So I simply have to stop the MAS Office Distribution in Jamf, run a script to remove the MAS Office Apps on the target Clients and then run the Office PKG Installer on the Clients?

Thanks!


Yes, the same would go for any other app. Just remove the AppStore version (make sure its not configured to auto reinstall), and target the device with a Policy to deploy a package with the App. 


Does this also work for OneDrive?

PKG Outlook can use the data from the previous MAS Outlook without any issues?

So I simply have to stop the MAS Office Distribution in Jamf, run a script to remove the MAS Office Apps on the target Clients and then run the Office PKG Installer on the Clients?

Thanks!


Replacing the MAS version of OneDrive with the standalone version isn't quite so simple because the prefs domains are different (documented here: https://learn.microsoft.com/en-us/sharepoint/deploy-and-configure-on-macos) so you'll need to update any Configuration Profile you'd used to provide OneDrive settings.

I've never had to try removing the MAS version myself, but I have seen it recommended that before deleting the app you should run the /Applications/OneDrive.app/Contents/Resources/ResetOneDriveAppStandalone.command script which will will remove everything in ~/Library/Group Containers/<onedrive>  as well as the content in ~/Library/CloudStorage. The latter gets archived into a folder (the location varies depending on macOS version) with all of the on-disk (non-dataless) content. (That info comes from posts regarding the script in the #microsoft-onedrive channel on MacAdmins Slack) 


Same as OneDrive, Outlook will setup like new and download the data.

For Other apps like, Excel, Word, Powerpoint you can remove _MASReceipt folder inside .app Content folder, it will convert to pkg version


Replacing the MAS version of OneDrive with the standalone version isn't quite so simple because the prefs domains are different (documented here: https://learn.microsoft.com/en-us/sharepoint/deploy-and-configure-on-macos) so you'll need to update any Configuration Profile you'd used to provide OneDrive settings.

I've never had to try removing the MAS version myself, but I have seen it recommended that before deleting the app you should run the /Applications/OneDrive.app/Contents/Resources/ResetOneDriveAppStandalone.command script which will will remove everything in ~/Library/Group Containers/<onedrive>  as well as the content in ~/Library/CloudStorage. The latter gets archived into a folder (the location varies depending on macOS version) with all of the on-disk (non-dataless) content. (That info comes from posts regarding the script in the #microsoft-onedrive channel on MacAdmins Slack) 


This is the OneDrive Uninstall Script from Microsoft, Am I right that it has to be run as the logged in User and not as Root User when executed via Self Service?

 

#!/bin/bash # This script cleans OneDrive standalone app states MyPath=`dirname ${0}` MyDir=`realpath $MyPath` GroupContainer=~/Library/Group\\ Containers/UBF8T346G9.OneDriveStandaloneSuite SupportFolder=~/Library/Application\\ Support/OneDrive LogFolder=~/Library/Logs/OneDrive ExtensionBundleId=com.microsoft.OneDrive.FileProvider DocumentsFolder=~/Documents DesktopFolder=~/Desktop PicturesFolder=~/Pictures echo killing OneDrive killall OneDrive if [ -d "$GroupContainer" ]; then echo removing GroupContainer: $GroupContainer rm -rf "$GroupContainer" fi if [ -d "$SupportFolder" ]; then echo removing $SupportFolder rm -rf "$SupportFolder" fi if [ -d "$LogFolder" ]; then echo removing $LogFolder rm -rf "$LogFolder" fi for KNOWNFOLDER in $DocumentsFolder $DesktopFolder $PicturesFolder do echo Checking $KNOWNFOLDER if [ -h "$KNOWNFOLDER" ]; then # Check if the symlink has our expected xattr XATTR=`xattr -s $KNOWNFOLDER` if [[ "$XATTR" == *"com.microsoft.OneDrive.KnownFolderVolFs"* ]]; then echo Deleting Known Folder symlink at $KNOWNFOLDER chflags -h nouchg "$KNOWNFOLDER" rm -f "$KNOWNFOLDER" if [ $? -ne 0 ]; then echo Failed to delete Known Folder symlink at $KNOWNFOLDER. Grant Terminal.app with Full Disk Access, and try again. exit $?; else mkdir "$KNOWNFOLDER" fi fi fi done echo Archiving all File Provider domains belonging to $ExtensionBundleId $MyDir/../MacOS/OneDrive /removedomains echo Done archiving domains echo removing defaults rm -f ~/Library/Preferences/com.microsoft.OneDrive.plist rm -f ~/Library/Preferences/com.microsoft.OneDriveUpdater.plist rm -f ~/Library/Preferences/com.microsoft.OneDriveStandaloneUpdater.plist echo killing cfprefsd killall cfprefsd echo waiting for cfprefsd defaults read NSGlobalDomain > /dev/null echo disabling Finder Extension /usr/bin/pluginkit -e ignore -i com.microsoft.OneDrive.FinderSync echo stopping Finder Extension killall FinderSync PASSWORD_MATCH="Used to identify you when you start up OneDrive Standalone." security find-generic-password -j "$PASSWORD_MATCH" &> /dev/null while [ $? -eq 0 ]; do security delete-generic-password -j "$PASSWORD_MATCH" if [ $? -ne 0 ]; then echo Failed to clear cached credentials for business fi security find-generic-password -j "$PASSWORD_MATCH" &> /dev/null done PASSWORD_MATCH="Used to identify you when you start up OneDrive Standalone for business." security find-generic-password -j "$PASSWORD_MATCH" &> /dev/null while [ $? -eq 0 ]; do security delete-generic-password -j "$PASSWORD_MATCH" if [ $? -ne 0 ]; then echo Failed to clear cached credentials for business fi security find-generic-password -j "$PASSWORD_MATCH" &> /dev/null done PASSWORD_MATCH="com.microsoft.OneDrive.HockeySDK" security find-generic-password -l "$PASSWORD_MATCH" &> /dev/null if [ $? -eq 0 ]; then security delete-generic-password -l "$PASSWORD_MATCH" if [ $? -ne 0 ]; then echo Failed to clear OneDrive main App HockeySDK password credential fi fi PASSWORD_MATCH="com.microsoft.OneDrive.FinderSync.HockeySDK" security find-generic-password -l "$PASSWORD_MATCH" &> /dev/null if [ $? -eq 0 ]; then security delete-generic-password -l "$PASSWORD_MATCH" if [ $? -ne 0 ]; then echo Failed to clear OneDrive FinderSync HockeySDK credential fi fi PASSWORD_MATCH="com.microsoft.OneDriveUpdater.HockeySDK" security find-generic-password -l "$PASSWORD_MATCH" &> /dev/null if [ $? -eq 0 ]; then security delete-generic-password -l "$PASSWORD_MATCH" if [ $? -ne 0 ]; then echo Failed to clear OneDriveUpdater HockeySDK credential fi fi PERSISTED_COOKIE_MATCH="com.microsoft.onedrive.cookies" security find-generic-password -s "$PERSISTED_COOKIE_MATCH" &> /dev/null if [ $? -eq 0 ]; then security delete-generic-password -s "$PERSISTED_COOKIE_MATCH" if [ $? -ne 0 ]; then echo Failed to clear OneDrive persistent cookies fi fi PERSISTED_COOKIE_VALIDATORS_MATCH="com.microsoft.onedrive.cookievalidators" security find-generic-password -s "$PERSISTED_COOKIE_VALIDATORS_MATCH" &> /dev/null if [ $? -eq 0 ]; then security delete-generic-password -s "$PERSISTED_COOKIE_VALIDATORS_MATCH" if [ $? -ne 0 ]; then echo Failed to clear OneDrive persistent cookie validators fi fi

 


This is the OneDrive Uninstall Script from Microsoft, Am I right that it has to be run as the logged in User and not as Root User when executed via Self Service?

 

#!/bin/bash # This script cleans OneDrive standalone app states MyPath=`dirname ${0}` MyDir=`realpath $MyPath` GroupContainer=~/Library/Group\\ Containers/UBF8T346G9.OneDriveStandaloneSuite SupportFolder=~/Library/Application\\ Support/OneDrive LogFolder=~/Library/Logs/OneDrive ExtensionBundleId=com.microsoft.OneDrive.FileProvider DocumentsFolder=~/Documents DesktopFolder=~/Desktop PicturesFolder=~/Pictures echo killing OneDrive killall OneDrive if [ -d "$GroupContainer" ]; then echo removing GroupContainer: $GroupContainer rm -rf "$GroupContainer" fi if [ -d "$SupportFolder" ]; then echo removing $SupportFolder rm -rf "$SupportFolder" fi if [ -d "$LogFolder" ]; then echo removing $LogFolder rm -rf "$LogFolder" fi for KNOWNFOLDER in $DocumentsFolder $DesktopFolder $PicturesFolder do echo Checking $KNOWNFOLDER if [ -h "$KNOWNFOLDER" ]; then # Check if the symlink has our expected xattr XATTR=`xattr -s $KNOWNFOLDER` if [[ "$XATTR" == *"com.microsoft.OneDrive.KnownFolderVolFs"* ]]; then echo Deleting Known Folder symlink at $KNOWNFOLDER chflags -h nouchg "$KNOWNFOLDER" rm -f "$KNOWNFOLDER" if [ $? -ne 0 ]; then echo Failed to delete Known Folder symlink at $KNOWNFOLDER. Grant Terminal.app with Full Disk Access, and try again. exit $?; else mkdir "$KNOWNFOLDER" fi fi fi done echo Archiving all File Provider domains belonging to $ExtensionBundleId $MyDir/../MacOS/OneDrive /removedomains echo Done archiving domains echo removing defaults rm -f ~/Library/Preferences/com.microsoft.OneDrive.plist rm -f ~/Library/Preferences/com.microsoft.OneDriveUpdater.plist rm -f ~/Library/Preferences/com.microsoft.OneDriveStandaloneUpdater.plist echo killing cfprefsd killall cfprefsd echo waiting for cfprefsd defaults read NSGlobalDomain > /dev/null echo disabling Finder Extension /usr/bin/pluginkit -e ignore -i com.microsoft.OneDrive.FinderSync echo stopping Finder Extension killall FinderSync PASSWORD_MATCH="Used to identify you when you start up OneDrive Standalone." security find-generic-password -j "$PASSWORD_MATCH" &> /dev/null while [ $? -eq 0 ]; do security delete-generic-password -j "$PASSWORD_MATCH" if [ $? -ne 0 ]; then echo Failed to clear cached credentials for business fi security find-generic-password -j "$PASSWORD_MATCH" &> /dev/null done PASSWORD_MATCH="Used to identify you when you start up OneDrive Standalone for business." security find-generic-password -j "$PASSWORD_MATCH" &> /dev/null while [ $? -eq 0 ]; do security delete-generic-password -j "$PASSWORD_MATCH" if [ $? -ne 0 ]; then echo Failed to clear cached credentials for business fi security find-generic-password -j "$PASSWORD_MATCH" &> /dev/null done PASSWORD_MATCH="com.microsoft.OneDrive.HockeySDK" security find-generic-password -l "$PASSWORD_MATCH" &> /dev/null if [ $? -eq 0 ]; then security delete-generic-password -l "$PASSWORD_MATCH" if [ $? -ne 0 ]; then echo Failed to clear OneDrive main App HockeySDK password credential fi fi PASSWORD_MATCH="com.microsoft.OneDrive.FinderSync.HockeySDK" security find-generic-password -l "$PASSWORD_MATCH" &> /dev/null if [ $? -eq 0 ]; then security delete-generic-password -l "$PASSWORD_MATCH" if [ $? -ne 0 ]; then echo Failed to clear OneDrive FinderSync HockeySDK credential fi fi PASSWORD_MATCH="com.microsoft.OneDriveUpdater.HockeySDK" security find-generic-password -l "$PASSWORD_MATCH" &> /dev/null if [ $? -eq 0 ]; then security delete-generic-password -l "$PASSWORD_MATCH" if [ $? -ne 0 ]; then echo Failed to clear OneDriveUpdater HockeySDK credential fi fi PERSISTED_COOKIE_MATCH="com.microsoft.onedrive.cookies" security find-generic-password -s "$PERSISTED_COOKIE_MATCH" &> /dev/null if [ $? -eq 0 ]; then security delete-generic-password -s "$PERSISTED_COOKIE_MATCH" if [ $? -ne 0 ]; then echo Failed to clear OneDrive persistent cookies fi fi PERSISTED_COOKIE_VALIDATORS_MATCH="com.microsoft.onedrive.cookievalidators" security find-generic-password -s "$PERSISTED_COOKIE_VALIDATORS_MATCH" &> /dev/null if [ $? -eq 0 ]; then security delete-generic-password -s "$PERSISTED_COOKIE_VALIDATORS_MATCH" if [ $? -ne 0 ]; then echo Failed to clear OneDrive persistent cookie validators fi fi

 


@JevermannNG Yes, that script needs to be run as the logged in user. The indicator for that is the script uses the "~" in file paths rather than prograttically determining the path to the home directory of the logged in user.


Same as OneDrive, Outlook will setup like new and download the data.

For Other apps like, Excel, Word, Powerpoint you can remove _MASReceipt folder inside .app Content folder, it will convert to pkg version


@shrisivakumaran Should I ran an Outlook Uninstaller before switching to the Outlook PKG Version?


try running this
rm -rf /Applications/Microsoft\\ Outlook.app/Contents/_MASRe*