Dynamics CRM Support Blog
Problems configuring the CRM Outlook client? Use the wizard!
CRM Resource Center
FAQ About Technical SupportOnline | On-Premise
FAQ About Billing
Implementation Guide
Microsoft Dynamics CRM Developer Center and SDK
My CRM Mail Router stop working!
It was running during last month, but today I realized that mails are not sending. I suspect that I need to change the password of special Office 365 user that I am using for Mail Router. I reset his password and I am able successfully login to Outlook web access. As well I can open other users mailboxes with this user.
I changed the password in Mail Router Configuration Manager, published, loaded deployment data but when I am trying Test Access I am getting:
Name: UserName
Incoming Status: Failure - The remote Microsoft Exchange e-mail server returned the error "(401) Unauthorized". Verify that you have permission to connect to the mailbox. The request failed with HTTP status 401: Unauthorized.
Server: https://podXXXXX.outlook.com/ews/exchange.asmx (mailrouter@sub.onmicrosoft.com)
Outgoing Status: Failure - An error occurred while checking the connection to e-mail server https://podXXXXX.outlook.com/ews/exchange.asmx. The request failed with HTTP status 401: Unauthorized.
In the Application Event log I found following events:
Fault bucket , type 0
Event Name: CRMmanaged
Response: Not available
Cab Id: 0
Problem signature:
P1: 5.0.9690.2165
P2: Microsoft.Crm.Tools.EmailAgent
P3: Microsoft.Crm
P4: Object reference not set to an instance of an object.;Hash='1347396225'
P5:
P6:
P7:
P8:
P9:
P10:
Attached files:
C:\Windows\Temp\tmp9F5D.tmp
These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\NonCritical_5.0.9690.2165_f5b611cfe3894abc42c7ea2fe56b47ed6beea3c0_cab_0f94a040
Analysis symbol:
Rechecking for solution: 0
Report Id: 22f57bb3-8406-11e1-9154-00155d016918
Report Status: 4
#26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangeOnlinePollingSendEmailProvider. System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.HandleProcessMessageError(Exception exception, Entity emailMessage)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)
#61042 - An error occurred while processing the outgoing e-mail message with subject "An Opportunity has been Won - Please Send Licenses CRM:0018179" for ExchangeOnline: https://dev.crm.dynamics.com/crmXXXXX for delivery through https://podXXXXX.outlook.com/ews/exchange.asmx. System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.Crm.Tools.Email.Providers.ExchangeServiceBinding.CreateItem(CreateItemType CreateItem1)
at Microsoft.Crm.Tools.Email.Providers.ExchangeOnlinePollingSendEmailProvider.SendMessage(MessageType mailMessage)
at Microsoft.Crm.Tools.Email.Providers.ExchangeOnlinePollingSendEmailProvider.ProcessMessageInternal(Entity emailMessage)
Any help will be appreciated!
Arkady.
Have you checked this one?
blogs.msdn.com/.../microsoft-dynamics-crm-4-0-e-mail-router-unexpectedly-stalls.aspx
Regards,
F
Thank you,
I tried, but it wasn't solve my problem.
Ensure you can log into CRM as the email router user. Also check the services that are running with that user login and change passwords there as needed.
Best Regards, Donna
I can successfully login with this user to Dynamics and Office 365. I confirmed that this user can open all other users mailboxes in Exchange online.
Actually I can't run services with this user. This user is not exist in our AD. I created it in Office 365 and using same live ID in Dynamics CRM.
I tried to use my account (that have permissions to all mailboxes too) to run service. Same problem...
In any case thank you,
I recommend that you use a user as the Service login for the Email Router that is a CRM user and has full Administrator rights on the O365 account and that exists as an admin in Active Directory. This should work as I've used this approach in several implementations.
If you try the above and it does not work, then chances are that you've missed some required setting in O365
Can I use my account for test purposes?
I see the problem because my account is verified with ADFS and not Exchange online itself.
I will try it now.
Same...
Most weird it is not able to open my mail box using my user account in mail router config and service login:
#26090 - An error occurred while opening mailbox myuser@domain.com. Microsoft.Crm.Tools.Email.Providers.EmailException: The remote Microsoft Exchange e-mail server returned the error "(401) Unauthorized". Verify that you have permission to connect to the mailbox. ---> System.Net.WebException: The request failed with HTTP status 401: Unauthorized. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Microsoft.Crm.Tools.Email.Providers.ExchangeServiceBinding.GetFolder(GetFolderType GetFolder1) at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.OpenMailbox() at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.InitExchangeConnector() --- End of inner exception stack trace --- at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.WrapException(Exception e) at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.InitExchangeConnector() at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.OpenMailbox() at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()\r\nSystem.Net.WebException: The request failed with HTTP status 401: Unauthorized. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Microsoft.Crm.Tools.Email.Providers.ExchangeServiceBinding.GetFolder(GetFolderType GetFolder1) at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.OpenMailbox() at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.InitExchangeConnector()
Does the account you are trying to use have ALL the rights I mentioned above to include Admin rights on Exchange Online, Admin rights in Active Directory and System Admin rights in CRM. I've had people in the past tell me that the user account has all those rights to later find out that it didn't.
Unfortunately the error message you are providing is not helping me identify the issue.
If the user account does have the three rights I mentioned above then I suspect you are going to have to connect the email router to Exchange Online using something other than the discovery service URL. In one implementation we had to use SMTP protocol to connect as we and Microsoft could not get the other URL to work.
Yes, generic account is Administrator on Office 365 portal, I can open other users mailboxes using this account. As I already mention it is not exist in AD. And it have all permissions on CRM.
Mail router fails with this account.
I tried my account as well. I have Admin rights for AD and it is federated account with Office 365. To login to CRM I am using my Live ID account, that is Administrator on CRM. And I am failed with this configuration too.
I installed mail router on my home computer trying both accounts and the results are similar. I enabled logging for Mail Router but it is not providing too much information.
I opened support incident for Office 365. For meantime you mentioned that you have other solution. Could you please point me to instructions.
Thank you very much,
Hello Karasin!
We have the same problem. Did you find any solutions ...
We get the same errors. We also tried it with the administrator account, but always the same message ...
We tried to open the URL in the explorer and we get access.
So I think our problem is not a setup problem. I hope Microsoft find a solution ...
Have a nice day
Christian
This problem was solved by Microsoft CRM support. They installed new Mail Router update CRM2011-Router-KB2702300-ENU-amd64. I think it is not public avalable yet and you need to request it from Microsoft.
Good luck,
Hy Arkady!
Thank you for the good news. I hope I will contacted from microsoft.
Thanks
Hi, do you happen to have that CRM2011-Router-KB2702300-ENU-amd64 file to share to us?
Can somebody tell me how i can get this update / fix: CRM2011-Router-KB2702300-ENU-amd64 ?
As Arkady stated, you most likely need to open a ticket with Microsoft Support or wait a few more days and the fix will most likely be available in Update Rollup 8. I've also heard that downloading and using the latest email router works. You can go to the download center and try that to see if it works for you.