Menu Close

Jamf Pro 10 & Microsoft Intune Integration: Hiding Microsoft Company Portal.app post-installation

In our integration testing of Jamf Pro and Microsoft Intune, we’ve had a handful of users directly launch the Microsoft Company Portal after it was installed.

Since users will need to launch the Company Portal app from Jamf Self Service for macOS to register their computers with Azure Active Directory (Azure AD) as a device managed by Jamf Pro, we’re testing out the following Files and Processes > Execute Command to hide the Company Portal.app after its installed:

/usr/bin/chflags hidden /Applications/Company\ Portal.app/ ; /bin/sleep 30 ; /usr/bin/sqlite3 $(/usr/bin/sudo find /private/var/folders -name com.apple.dock.launchpad)/db/db "DELETE FROM apps WHERE title='Company Portal';" && /usr/bin/killall Dock

Also, we’ve observed that the version of Microsoft AutoUpdate bundled with the Company Portal installer is out-of-date, so we’re installing Microsoft_AutoUpdate_4.1.18070902_Updater.pkg right after Microsoft Company Portal-1.5.pkg is installed.

The following update for Mojave will disable:
System Preferences > Dock > Show recent applications in Dock

/usr/bin/chflags hidden /Applications/Company\ Portal.app/ ; /bin/sleep 30 ; /usr/bin/sqlite3 $(/usr/bin/sudo find /private/var/folders -name com.apple.dock.launchpad)/db/db "DELETE FROM apps WHERE title='Company Portal';" ; /usr/bin/su \- "`/usr/bin/stat -f%Su /dev/console`" -c "/usr/bin/defaults write com.apple.dock show-recents -bool NO" && /usr/bin/killall Dock
Posted in macOS, Microsoft Intune, Tips & Tricks