This article describes how to set up Office 365 and the CRM Email Router. There are two excellent articles that cover the basics, you can see those here and here. Once you have set up the basic configuration take a look at how you can then easily use a single administrative user account to process the mailboxes.

When I set-up demo’s I like to be able to send and receive emails and queues in/from CRM. Typically I have 4 or 5 queues set up, each with a with a different email account e.g:

  • Compliance@
  • Legal@
  • InvestorRelations@
  • and so on

I set up a mailbox for each queue (which is a user account in Office 365) and then I use the Microsoft CRM Email Router to process emails in each of those mailboxes. I create a single administrative account in Office 365 and I then give this administrative account permissions on all the mailboxes that I need to monitor. The only thing left for me then is to create one inbound configuration profile which I can reuse for each mailbox:


In order to give your administrative account permissions on all mailboxes you’ll need to run the following from PowerShell (I do not advise you do this for a production system, see steps later to add permissions on a mailbox by mailbox basis):

Run PowerShell (run as administrator):


Set-ExecutionPolicy RemoteSigned


$Cred = Get-Credential


$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $Cred -Authentication Basic -AllowRedirection


Import-PSSession $Session


Get-Mailbox | Where {$_.PrimarySMTPAddress -match ““} | Add-MailboxPermission -user -AccessRights FullAccess -inheritanceType all -AutoMapping $false

Alternatively you can give your administrative user permission on each mailbox as follows:

At step 5 for each mailbox:

Add-MailboxPermission -User admin -AccessRights FullAccess -InheritanceType All

You can then easily test the permission by logging into the Office 365 Outlook web client as the admin account and open the required mailbiox (in Outlook web, click on the presence image and “open other mailbox”


This posting is provided “AS IS” with no warranties, and confers no rights.

Next Week on Mark Margolis’s Blog: Charts and Visualisations for Microsoft Dynamics CRM 2011