We were just migrated from Exchange Online to Office 365. Among the many things that had to be reconfigured to work with Office 365 was the Microsoft CRM 2011 Email Router. There were two distinct tasks. First, give permissions to the account that the Email Router uses to the various mail boxes that use the Email Router. Second, set up the CRM 2011 Email Router.
Grant Email Account Full Access to Mail Boxes:
1. Open Windows PowerShell
2. Set your credentials by entering:
$LiveCred = Get-Credential
3. Enter the username and password for an account that has administrative privileges in Office 365.
4. Enter the command:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
5. Then the command:
Import-PSSession $Session
6. For each of the mailboxes that your account needs to access enter the command (mailboxname is the mailbox you want to access and emailaccount is the account the CRM Email Router will use):
Add-MailboxPermission “mailboxname” -User “emailaccount” -AccessRights FullAccess
7. Disconnect from your Exchange session:
Remove-PSSession $Session
Set up the CRM 2011 Email Router:
1. Get your Exchange Server name by logging into Office 365 and going to Outlook, Click on “Options” in the upper right and select “See All Options”. From there click “Settings for POP, IMAP, and SMTP access…” and make a note of the Server name under POP setting. It will be something like PODxxxxx.outlook.com
2. Start the CRM E-Mail Configuration Manager
3. On the “Configuration Profiles” Create a new Incoming Profile with the following setting:
Profile Name: Office 365 Incoming (or something like that)
Direction: Incoming
E-mail Server Type: ExchangeOnline
Exchange Web Services URL: https://podxxxxx.outlook.com/ews/Exchange.asmx (use the server from step 1)
Access Credentials: Other Specified
Username: (the account you gave access to)
Password: (the password)
4. On the “Configuration Profiles” Create a new Outgoing Profile with the following setting:
Profile Name: Office 365 Outgoing (or something like that)
Direction: Outgoing
E-mail Server Type: ExchangeOnline
Exchange Web Services URL: https://podxxxxx.outlook.com/ews/Exchange.asmx (use the server from step 1)
Access Credentials: Other Specified
User Type: Administrator
Username: (the account you gave access to)
Password: (the password)
Access Type: Delegate Access
5. If necessary change the Default Incoming and Outgoing profiles for your CRM server(s) on the “Deployment” tab
6. Click Publish to save the new configuration
7. Test by going to the “Users, Queues, and Forward Mailboxes” tab, clicking on Load Data, Select all users and queues and click test Access.