Deploy plist preferences
Write a preference file for a Microsoft app and ship it with Jamf Pro or Intune.
Microsoft's Mac apps read their settings from property list files. Put the right key in the right plist and the app follows it. Deliver that plist through your MDM as a managed preference and it applies to every Mac you scope, and users cannot change it. This guide uses Outlook as the example.
com.microsoft.OutlookKey PlayMyEmailsEnabledCreate the file â
A plist is XML. Open any plain text editor, such as Visual Studio Code or TextEdit in plain text mode, and add the declaration, a root plist element, and a dict holding your keys.
<?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>PlayMyEmailsEnabled</key>
<false/>
</dict>
</plist>This turns off the Play My Emails feature in Outlook. Save it as com.microsoft.Outlook.plist. The file name is the app's preference domain, and each app or suite has its own. Add as many keys as you need to the same dict.
Where plist files live â
macOS reads preferences from three places. Which one you use decides who the setting applies to and whether users can override it.
~/Library/Preferences/One local account only. The app writes here when the user changes a setting.
/Library/Preferences/Every account on the Mac. Set by scripts or by hand. User preferences take priority over it.
/Library/Managed Preferences/Written by your MDM. Applies to every account and overrides both of the others. This is where a deployed plist ends up.
Deploy with Jamf Pro â
com.microsoft.Outlook as the preference domain.Deploy with Intune â
Intune gives you three ways in. Pick the one that fits. Whichever you choose, go to Devices, macOS, Configuration profiles, Create profile in the Intune admin center.
A preference file is the plist with its wrapper removed. Keep only what sits inside the dict, and save it as .xml.
<key>PlayMyEmailsEnabled</key>
<false/>
<key>DefaultEmailAddressOrDomain</key>
<string>example.com</string>Not sure whether a key is in the settings catalog? The DeviceConfig repo lists every key it supports, for Mac and iOS. If you use the settings catalog and a preference file together, do not set the same key in both. Keys must be unique across the profiles that reach a device. After any of the three options, assign the profile to your user or device groups and save. Devices apply it on their next sync.
Test and validate â
/Library/Managed Preferences/. If it is not there, the profile has not arrived yet.0.ls "/Library/Managed Preferences/"
defaults read com.microsoft.Outlook PlayMyEmailsEnabledBefore rolling out widely, scope to a small test group and open the app. A wrong key name fails silently, so the only real test is seeing the setting change. Double check the bundle identifier too. Outlook is com.microsoft.Outlook, with a capital O.
Troubleshooting â
sudo jamf policy on Jamf, and watch the profile list in System Settings.defaults read check. If the value is right but the app ignores it, the key name or type is wrong. Compare against Microsoft's reference for that app.Further reading â
Want to see a finished profile before writing your own? The breakdown page walks through a real MOFA mobileconfig key by key.