Today we’ll cover configuring the Dynamics CRM 2011 Email Router to use Office 365 for Outgoing emails. The process can be broken down into three parts. Part 1 consists of gathering details from Office 365 about the deployment, Part 2 is granting permissions via PowerShell and Part 3 involves the actual email router configuration.
Part 1 – Gather Office 365 Exchange Online Details
1. Login to Office 365: https://login.microsoftonline.com
2. Click on the Outlook tab.
3. Click on the ? button and choose About.
A window with the details of the mail settings will appear.
4. Scroll down to the section on External SMTP settings:
Part 2 – Grant Send As Permissions to User via PowerShell
If this is your first time using PowerShell, you will need to make sure you enable the Execution Policy for Remote Signed Scripts.
Open PowerShell as an Administrator from your local computer:
1. Click on the Windows Start Key
2. Type PowerShell
3. Right Click and choose to “Run As Administrator”
4. Enter the following:
a. Set-ExecutionPolicy RemoteSigned
Note: The following error will occur if you did not run PowerShell as Administrator. To resolve this issue, close PowerShell and reopen with as Administrator.
5. Next we need to connect to Office 365 using the Live ID credentials with Admin access.
In PowerShell, enter the following:
$LiveCred = Get-Credential
Once you hit enter, you will be prompted for your Office 365 Live ID credentials.
6. Enter the following:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic –AllowRedirection
7. Grant the Send As permission
$csv = get-mailbox
foreach($line in $csv)
Add-RecipientPermission $Line.identity -Trustee <firstname.lastname@example.org> -AccessRights SendAs
Note: email@example.com is a place holder for the actual account you are adding the Send As permission for.
Part 3 – Configuring the Email Router
Once we have gathered information from Office 365, we can then move to Part 3– configuring the email router.
In the Exchange Web Services URL field, enter the complete URL for the outgoing e-mail server. Use the Exchange Web Services (EWS) URL format (EWS/exchange.asmx), as shown in the following example:
If you select Administrator as the user type, you must select either Delegate Access or Send As permission as the access type. Delegate Access causes e-mail to be sent as “Send on behalf of” messages. Send As permission causes e-mail to be sent as “Send As” messages.
If you are using Queues, we have also covered configuring the Dynamics CRM 2011 Email Router for an Incoming Profile.
If you would like assistance configuring the email router or if you would like us to host the it, please contact us at firstname.lastname@example.org/stg.