异常:System.ServiceModel.Security.SecurityAccessDeniedException:访问被拒绝。 配置 Microsoft Dynamics CRM 2011 客户端 for Outlook 时出错

本文提供了在为 Outlook 配置 Microsoft Dynamics CRM 2011 客户端时发生的错误的解决方案。

适用范围:Microsoft Dynamics CRM 2011
原始 KB 编号: 2674807

症状

在 Office 365 平台上针对 Dynamics CRM Online 配置 Microsoft Dynamics CRM 2011 客户端 for Outlook 时,成功检索组织后收到错误:

与 Microsoft Dynamics CRM 服务器通信时出现问题。 服务器可能不可用。 请稍后重试。 如果问题仍然存在,请与系统管理员联系。”

“连接到 URL 时出错: https://disco.crm4.dynamics.com/XRMServices/2011/Discovery.svc 异常:System.ServiceModel.Security.SecurityAccessDeniedException:访问被拒绝。”

原因

仅当出现这种情况时::

  • Dynamics CRM Online 在 Office 365 平台上使用
  • Office 365上的用户名使用多字节字符,例如日语或韩语

解决方案

将Office 365用户的配置文件更改为英语。

更多信息

平台错误
====================================
15:38:44 |错误|连接到 URL 时出错: https://disco.crm4.dynamics.com/XRMServices/2011/Discovery.svc 异常:System.ServiceModel.Security.SecurityAccessDeniedException: 访问被拒绝。
服务器堆栈跟踪:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood (Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply (ProxyOperationRuntime 操作,ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call (String action、Boolean oneway、ProxyOperationRuntime operation、Object[] ins、Object[] outs、TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService (IMethodCallMessage methodCall,ProxyOperationRuntime 操作)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke (IMessage 消息)

在 [0]处重新引发异常:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage (IMessage reqMsg,IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (MessageData& msgData,Int32 type)
at Microsoft.Xrm.Sdk.Discovery.IDiscoveryService.Execute (DiscoveryRequest 请求)
at Microsoft.Xrm.Sdk.Client.DiscoveryServiceProxy.Execute (DiscoveryRequest 请求)
at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.DeploymentInfo.LoadOrganizations (AuthUIMode uiMode、Form parentWindow、凭据凭据)
at Microsoft.Crm.Application.Outlook.Config.DeploymentsInfo.InternalLoadOrganizations (OrganizationDetailCollection orgs, AuthUIMode uiMode, Form parentWindow) 15:38:52 |警告|客户端配置失败,出现异常:远程服务器返回错误: (401) 未授权。
at System.Net.HttpWebRequest.GetResponse () at Microsoft.Crm.Outlook.ClientAuth.ClaimsBasedAuthProvider'1.MakeHttpPostRequest (Uri postUri,String postData)
at Microsoft.Crm.Outlook.ClientAuth.ClaimsBasedAuthProvider'1.SetBearerCookie (SignInResponseMessage signInResponseMessage)
at Microsoft.Crm.Outlook.ClientAuth.PassportAuthProvider'1.SignIn ()
at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory'1.SignIn (Uri endPoint、凭据凭据、AuthUIMode uiMode、IClientOrganizationContext 上下文、Form parentWindow、Boolean retryOnError)
at Microsoft.Crm.Outlook.ClientAuth.ClientAuthProvidersFactory'1.GetAuthProvider (Uri endPoint、凭据凭据、AuthUIMode uiMode、Uri webEndPoint、IClientOrganizationContext 上下文、Form parentWindow) at Microsoft.Crm.Application.Outlook.Config。ServerInfo.LoadUserId ()
at Microsoft.Crm.Application.Outlook.Config.ServerInfo.Initialize (Uri discoveryUri,OrganizationDetail selectedOrg,String displayName,boolean isPrimary) at Microsoft.Crm.Application.Outlook.Config。ClientConfig.AddDeployment (DeploymentsDeployment[] deployments, AuthUIMode uiMode)
at Microsoft.Crm.Application.Outlook.Config.ClientConfig.AddDeployment_ReducedUI ()
at Microsoft.Crm.Application.Outlook.Config.ClientConfig.Run (布尔型 runInsideOutlook)