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 …, 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" ; loggedInUser=$( /bin/echo "show State:/Users/ConsoleUser" | /usr/sbin/scutil | /usr/bin/awk '/Name :/ && ! /loginwindow/ { print $3 }' ) ; [ -z "${loggedInUser}" ] && echo "Did not detect user" || /usr/bin/sqlite3 $(/usr/bin/sudo find /private/var/folders \( -name com.apple.dock.launchpad -a -user ${loggedInUser} \) 2> /dev/null)/db/db "DELETE FROM apps WHERE title='Company Portal';" && /usr/bin/killall Dock ; /usr/local/bin/jamf recon

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

Posted in Jamf Pro, Microsoft Intune, Scripts, Tips & Tricks

Related Posts