Solution | CRM 2013 Outlook Client – (407) Proxy Authentication Required Exception

Recently, we had a customer who upgraded their CRM 2011 Online to CRM 2013 Online. They had a few users who used CRM Outlook Client (Offline and Online).

Upon migration, they installed the CRM 2013 Outlook Client and were unable to open or create any CRM records from CRM Outlook Client.  They would see a “Waiting for webpage to Load from CRM server” popup.

Upon further investigation, the below exception was displayed in the trace file.

Exception occurred when authenticating with serverType: Remote Exception: System.InvalidOperationException: Metadata contains a reference that cannot be resolved: ‘’. —> System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
— End of inner exception stack trace —
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever retriever)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(Uri address, MetadataExchangeClientMode mode)
at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveServiceEndpointMetadata(Type contractType, Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceConfiguration..ctor(Uri serviceUri)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)
at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory`1.GetAuthProvider(Uri endPoint, Credential credentials, AuthUIMode uiMode, Uri webEndPoint, IClientOrganizationContext context, Form parentWindow)
at Microsoft.Crm.Application.SMWrappers.ClientOrganizationContextFactory.ClientOrganizationContext.Authenticate(CrmServerType serverType)


Quite obviously, the request was not able to make it through the proxy.  In my customer’s case, they had specified a proxy PAC file within the internet options and the settings were driven by Group policy. Upon further analysis, I understood that when a proxy PAC file is specified within the user’s Internet Options it will establish a new .NET AppDomain to be created to process the PAC file in the Outlook process. The Microsoft Dynamics CRM for Outlook must switch between the one being used for the client and the newly created AppDomain for the proxy PAC file into the .NET AppDomain which happens to more restricted. The solution is to instruct Microsoft.Crm.Application.Outlook.WebFormsHost.exe to use the default Windows proxy settings.


1. Close Microsoft Outlook
2. Navigate to ‘C:\Program Files\Microsoft Dynamics CRM\Client\res\web\bin’ folder
3. Create a file with the name ‘Microsoft.Crm.Application.Outlook.WebFormsHost.exe.config’
4. Copy the below contents to the file

<?xml version=”1.0″ encoding=”utf-8″?>
<defaultProxy enabled=”true” useDefaultCredentials=”true” >
<proxy autoDetect=”True” scriptLocation=http://yourproxy/yourpacfile;

5. Save the file and reopen Microsoft Outlook


2 thoughts on “Solution | CRM 2013 Outlook Client – (407) Proxy Authentication Required Exception

  1. Hi,

    In our case we just needed the forms exe to use default proxy settings – file contents to resolve the issue were:

  2. I was having an issue with an associate where he would get multiple instances of: microsoft.crm.application.outlook.webformshost.exe which caused his computer to start freezing up and eventually become unusable unless restarted. Inputting this somehow fixed the issue. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s