Skip to main content
Matrix42 Self-Service Help Center

Deploy Office365 for macOS

Deploy Office365 for MacOS

Matrix42 Secure Unified Endpoint Managements allows you to distribute Office365 with several methods and in different combinations, depending on your target platform, the management type and the types of your target devices. With Enterprise Mobility Management as an example you can configure and distribute Office365 applications for your smartphones, tablets and macOS devices and the Client Lifecycle Management allows you to distribute the whole Office365 suite in a bundle. This guide is dedicated to demonstrates how to distribute the Office365 for classic and co-managed devices with the installt UEM Agent on your macOS device fleet. 

Requirements

  • A macOS device for the Package Creation
  • A Matrix42 Account to download the macOS Components from the Matrix42 Marketplace
  • Configured File Upload Service
  • Administrative Access to the Unified Endpoint Management Console
  • A classic or co-managed macOS device as the target system for the installation

Download Sources

Create Package

  • On your macOS device, open Finder
  • Locate the downloaded Office365 for macOS package
  • Rename the package to e.g. Office365.pkg

Avoid using symbols (e.g. underscores) when renaming the package

  • Now locate the downloaded macOS Components archive
  • Perform a double click to extract the archive
  • Navigate to the Mac Package Wizard folder
  • Run the Mac Package Wizard.dmg
  • Open the Mac Package Wizard

In case you receive a warning, launch the Mac Package Wizard with a right click and select open (2x)

  • Drag and drop your Office365.pkg into the left section of the Package Wizard
  • Press Next
  • Under Name, ensure that the name matches the package file, e.g. Office365
  • Under Vendor, enter Microsoft
  • As version enter your downloaded version, e.g. 16.54.21101001
  • Enter any revision number or keep 0

In case the Package Wizard does not accept the entered values, press back and next and try again or restart the application

  • Press Next
  • Keep the Display text or customize it, e.g. Microsoft Office365 16.54.21101001
  • Check or uncheck the supported OS X version for this package, e.g. macOS 11.0 (BigSur)
  • Press Next
  • Replace the uninstall script with the following

To copy the script, select on the top right border of the script the button view source

If pasting is not working via Keyboard shortcuts, use a right click and select paste

#!/bin/sh
# uninstall.sh
# Matrix42 AG
#
# Created on 25/01/2017.
# Copyright (c) 2000-2017 Matrix42 AG. All rights reserved.
syslog -s -l warning "Empirum Agent running uninstall.sh"
syslog -s -l warning "--------------------------------------"
syslog -s -l warning "--------------------------------------"
syslog -s -l warning "Step 1"
syslog -s -l warning "Removing Office Apps from /Applications 
folder"
/bin/rm -rf "/Applications/Microsoft Excel.app"
/bin/rm -rf "/Applications/Microsoft PowerPoint.app"
/bin/rm -rf "/Applications/Microsoft Word.app"
/bin/rm -rf "/Applications/Microsoft Outlook.app"
/bin/rm -rf "/Applications/Microsoft OneNote.app"
syslog -s -l warning "--------------------------------------"
syslog -s -l warning "Step 2 & 3"
syslog -s -l warning "Removing directories for all users and Dock
icons"
userlist=$(/usr/bin/dscl . list /Users | grep -v '_' | grep -v 
'Guest' | grep -v 'daemon' | grep -v 'macports' | grep -v 'nobody'
| grep -v 'root') 
for user in $userlist 
do 
/bin/rm -rf 
"/Users/$user/Library/Containers/com.microsoft.errorreporting"
/bin/rm -rf "/Users/$user/Library/Containers/com.microsoft.Excel"
/bin/rm -rf 
"/Users/$user/Library/com.microsoft.netlib.shipassertprocess" /bin/rm -rf 
"/Users/$user/Library/Containers/com.microsoft.Office365ServiceV2"
/bin/rm -rf 
"/Users/$user/Library/Containers/com.microsoft.Outlook"
/bin/rm -rf 
"/Users/$user/Library/Containers/com.microsoft.PowerPoint"
/bin/rm -rf "/Users/$user/Library/Containers/com.microsoft.RMSXPCService"
/bin/rm -rf "/Users/$user/Library/Containers/com.microsoft.Word"
/bin/rm -rf 
"/Users/$user/Library/Containers/com.microsoft.onenote.mac"
/bin/rm -rf "/Users/$user/Library/Containers/UBF8T346G9.ms"
/bin/rm -rf "/Users/$user/Library/Containers/UBF8T346G9.Office"
/bin/rm -rf 
"/Users/$user/Library/Containers/UBF8T346G9.OfficeOsfWebHost"
/bin/rm -rf "/Users/$user/Library/Group Containers/UBF8T346G9.ms"
/bin/rm -rf "/Users/$user/Library/Group 
Containers/UBF8T346G9.Office"
/bin/rm -rf "/Users/$user/Library/Group 
Containers/UBF8T346G9.OfficeOsfWebHost"
#delete item from com.apple.dock.plist
###########
dloc=$(defaults read com.apple.dock persistent-apps | grep filelabel | awk '/Microsoft Excel/ {printf NR}')
dloc=$[$dloc-1]
/usr/libexec/PlistBuddy -c "Delete persistent-apps:$dloc" 
"/Users/$user/Library/Preferences/com.apple.dock.plist"
###########
dloc=$(defaults read com.apple.dock persistent-apps | grep filelabel | awk '/Microsoft Outlook/ {printf NR}')
dloc=$[$dloc-1]
/usr/libexec/PlistBuddy -c "Delete persistent-apps:$dloc" 
"/Users/$user/Library/Preferences/com.apple.dock.plist"
###########
dloc=$(defaults read com.apple.dock persistent-apps | grep filelabel | awk '/Microsoft PowerPoint/ {printf NR}')
dloc=$[$dloc-1]
/usr/libexec/PlistBuddy -c "Delete persistent-apps:$dloc" 
"/Users/$user/Library/Preferences/com.apple.dock.plist"
###########
dloc=$(defaults read com.apple.dock persistent-apps | grep filelabel | awk '/Microsoft Word/ {printf NR}')
dloc=$[$dloc-1]
/usr/libexec/PlistBuddy -c "Delete persistent-apps:$dloc" 
"/Users/$user/Library/Preferences/com.apple.dock.plist"
###########
dloc=$(defaults read com.apple.dock persistent-apps | grep filelabel | awk '/Microsoft OneNote/ {printf NR}')
dloc=$[$dloc-1]
/usr/libexec/PlistBuddy -c "Delete persistent-apps:$dloc" 
"/Users/$user/Library/Preferences/com.apple.dock.plist"
sleep 3
# Restart Dock to persist changes
/usr/bin/killall Dock
done

#if [ -d "/Applications/Office365.app/" ]
#then
#    rm -fR "/Applications/Office365.app"
#    syslog -s -l warning  "/Applications/Office365.app was removed"
#else
#    syslog -s -l warning "/Applications/Office365.app not found"
#fi

  • Press Create
  • Select a location where to save the package and press open
  • Wait until the packaging process is finished
  • Press Quit
  • In Finder, navigate to exported package
  • Perform a right click
  • Select Compress and wait until the compress process is finished

Upload Package

  • Login to your Unified Endpoint Management console
  • Navigate to Software Distribution
  • Select Software Packages
  • Click + Add Package
  • Drag and drop your compressed *.zip file 
  • Click Upload Package
  • Wait until the Package is uploaded and transferred

Assign Package

  • Navigate to Assignments
  • Click + Add Assignment
  • Enter a name, e.g. Office365 for macOS
  • Enter a description e.g. Office365 deployment to modern or co-managed macOS devices (optional)
  • Change the Status to Active
  • Click Devices
  • Click + 
  • Select your target device(s) and proceed with Select
  • Click Objects
  • Locate the software package name, e.g. Microsoft Office365 16.54.21101001
  • Select the Software Package
  • Proceed with Select 
  • Press Summary
  • Review your Configuration, Assigned Devices and Assigned Objects
  • Press Save to finish the assignment
  • Wait until the assignment process is finished

Force Installation 

  • On your target macOS device, click the UEM Agent icon
  • Press Check for new approved software
  • Open Console
  • Navigate to Log Reports
  • Locate the com.matrix42.EmpirumAgent.log
  • Review the downloading and installation process
  • Wait until Microsoft Office365 will be installed on the target device

Review Deployment

  • Open your Unified Endpoint Management console 
  • Select Deployments
  • Select Installation Status
  • Review the installation status for your target device
  • Was this article helpful?