In this document we discuss how to run a PowerShell script that provides all the necessary information to create a profile for Office 365. We store the output in a CSV file and then you can store them in AD to be read by Outlook Profiler.
Need to know
The ExchangeGUID (Outlook 2013-) and LegacyExchangeDN values are the ones necessary to create a functioning profile using this method. However, in place of the real ExchangeGUID, you may be able to use the outlook.office365.com value.
Step 1:
From a Windows 7/8/10 workstation run PowerShell as administrator and execute the following commands. You'll be prompted for your Office 365 credentials. Note it will take several minutes to download all the mailbox information depending on the speed of your network. When the script is finished it will output a CSV mailbox.txt file.
Step 2:
Add the values from the mailbox.txt file to your local Active Directory. Edit Outlook Profiler's ini file and set ReadActiveDirectory=1.
Step 3:
Set the ExchangeGUID and Mailbox name. Try setting ExchangeServerName=outlook.office365.com first. Failing that, use msExchMailboxGuid as shown. For MailboxName, try using %AD_userPrincipalName%, failing that use LegacyExchangeDN path as shown.
ExchangeServerName=%AD_msExchMailboxGuid%@domain.com
MailboxName=%AD_LegacyExchangeDN%
Step 4:
Enable Anonymous Authentication and Outlook Anywhere (aka Outlook over HTTP) like so:
EncryptDataBetweenOutlookExchange=0
LogonNetworkSecurity=3
ConnectExchangeUsingHTTP=1
ConnectWithNetwork=1
ExchangeServerProxyName=outlook.office365.com
ConnectUsingSSLOnly=1
MutuallyAuthenticateSessionSSL=1
PrincipalNameProxyServer=msstd:outlook.com
AuthenticationConnectingExchangeProxy=0
Note:
Since Office 365 profiles are usually remotely connected and thus the user is not pre-authenticated, you may optionally set the user name field the user will see when opening Outlook like so: LoginUsername=%AD_userPrincipalName%. For Outlook 2016, the ExchangeServerName key should be set to AUTO.