Posted on 02-23-2023 04:15 AM
We are currently looking to implement some preferences to Outlook.
We have configurations to block users from adding personal emails but is there a way to report on how many users have personal emails added and how to remove them
Thanks
Solved! Go to Solution.
Posted on 03-10-2023 01:08 AM
I managed to speak to Microsoft and they mentioned a file path that contained the email addresses, so i was able to create this extension attribute below and used an advanced search to export a CSV
#!/bin/bash
# Get the currently logged-in user's username
username=$(stat -f "%Su" /dev/console)
# Set the path to the ProfilePreferences.plist file
plist_path="/Users/${username}/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile/ProfilePreferences.plist"
# Check if the file exists
if [ -f "$plist_path" ]; then
# Use grep to search for the key "ActionsEndPointURLFor" and print the matching lines to the console
echo "<result>$(grep ActionsEndPointURLFor "$plist_path" | grep -o '[^/]*@[^/]*')</result>" | sed 's/ActionsEndPointURLFor//g'
else
# If the file doesn't exist, output an error message
echo "<result>File not found</result>"
fi
Posted on 02-24-2023 05:39 AM
I recommend opening a ticket with Microsoft. It may be possible to read the mail file to see what email accounts have been setup, but this is very much a Microsoft product question.
Posted on 03-10-2023 01:08 AM
I managed to speak to Microsoft and they mentioned a file path that contained the email addresses, so i was able to create this extension attribute below and used an advanced search to export a CSV
#!/bin/bash
# Get the currently logged-in user's username
username=$(stat -f "%Su" /dev/console)
# Set the path to the ProfilePreferences.plist file
plist_path="/Users/${username}/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile/ProfilePreferences.plist"
# Check if the file exists
if [ -f "$plist_path" ]; then
# Use grep to search for the key "ActionsEndPointURLFor" and print the matching lines to the console
echo "<result>$(grep ActionsEndPointURLFor "$plist_path" | grep -o '[^/]*@[^/]*')</result>" | sed 's/ActionsEndPointURLFor//g'
else
# If the file doesn't exist, output an error message
echo "<result>File not found</result>"
fi
Posted on 07-27-2023 08:07 AM
Hello, Give a try to below terminal script it. You need to enter only the domains which you want to be added to your test tenant and then check the behaviour.
Terminal script: defaults write com.microsoft.Outlook AllowedEmailDomains -array "domain1.com" "domain2.com" "domain3.com'
Note: This script will restrict the user to configure a personal mailbox in the Outlook app but it will not restrict a user already configured a personal mailbox in the Outlook app.