On macOS, Microsoft has made its Office 365 applications available via three different channels:
In turn, this means updates for these apps may be coming from a variety of sources:
Depending on how tightly an organization controls the ability of its users to install applications, it’s possible to have a scenario like this:
This can lead to challenges with keeping the apps updated, since there are three different update mechanisms for the three separate apps.
To help with figuring this out, it’s possible to query the application’s metadata using the mdls command line tool to see if the app has an associated App Store receipt. If it does, it’s possible to further figure out if the App Store receipt in question is for a Volume Purchase program (VPP) license or for a Mac App Store (MAS) license.
To check, you can run the following command and examine the output you get back:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/mdls -name kMDItemAppStoreReceiptType /path/to/application_name_goes_here.app | awk '{print $3}' | tr -d '"' |
For example, here’s the output you should see for Microsoft Outlook.app installed using an installer from office.com or other Microsoft resources:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username@computername ~ % /usr/bin/mdls -name kMDItemAppStoreReceiptType "/Applications/Microsoft Outlook.app" | awk '{print $3}' | tr -d '"' | |
(null) | |
username@computername ~ % |
Note: The (null) result is because the app does not have an associated App Store receipt.
Here’s the output you should see for Microsoft Outlook.app installed via the Mac App Store by someone using their personal Apple Account:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username@computername ~ % /usr/bin/mdls -name kMDItemAppStoreReceiptType "/Applications/Microsoft Outlook.app" | awk '{print $3}' | tr -d '"' | |
Production | |
username@computername ~ % |
Here’s the output you should see for Microsoft Outlook.app installed by an organization’s MDM using a Volume Purchase license:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username@computername ~ % /usr/bin/mdls -name kMDItemAppStoreReceiptType "/Applications/Microsoft Outlook.app" | awk '{print $3}' | tr -d '"' | |
ProductionVPP | |
username@computername ~ % |
For more information, please see below the jump.
Using this method, I’ve written several Jamf Pro Extension Attributes for the following Office 365 applications to assist with figuring out which tool should be updating a particular Microsoft Office 365 application:
All of the Extension Attributes should return output like that shown below:
If the app was installed using the Mac App Store with a person’s Apple Account, the Extension Attribute will return the following result:
MAS
If the app was licensed using the Volume Purchase program and installed by an MDM, the Extension Attribute will return the following result:
VPP
If the app was not installed via either the Mac App Store or the Volume Purchase program, the Extension Attribute will return the following result:
MAU
In all other cases, including where the app in question is not installed, the EA will return the following result:
NA
The Extension Attributes are available from GitHub via the following links: