Extension attribute to see if Internet accounts -> mail app and microsoft exchange being used

tegus232
Contributor

Hi,

 

can someone provide guidance on how i can collect data on if someone is using mail app for google or microsoft exchange setup through internet accounts. and if they are force logout.

 

thank you

1 REPLY 1

daniel_behan
Contributor III

I just wrote an EA that will show if Mail.app is configured for Exchange.

 

#!/bin/bash

loggedInUser=$( /usr/bin/who | /usr/bin/awk '/console/{ print $1 }' )

if [[ -e /Users/$loggedInUser/Library/Application\ Support/com.apple.exchangesync/exchangesync.active ]]; then
	echo "<result>True</result>"
else
	echo "<result>False</result>"
fi