无法在动态CRM CrmService API添加用户(Unable to add user wit

2019-08-17 03:30发布

我们有动态CRM 4更新汇总6配置为IFD并且已经设置了使用部署配置工具的UserRootPath。 通过CRM界面添加用户完美的作品。 但是,试图通过CrmService API添加用户时,用户不会被添加,我们得到以下包括跟踪消息。 通过CrmService API添加用户,如果我们删除从组织UserRootPath设置工作。 该路径似乎是正确的,中的其他LDAP工具配合使用,用户在指定的OU中。 我们使用的路径 “LDAP:// dcserver / OU = testorg; OU =主机; DC =域,DC =本地”。

[2009-09-29 13:19:54.7] Process: w3wp |Organization:---- |Thread:    9 |Category: Platform.Sdk |User: ---- |Level: Error | CompositeSoapExtensionExceptionHandler.Handle
>CrmSoapExtension detected CrmException:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DirectoryServices.DirectoryServicesCOMException (0x80072020): An operations error occurred.

   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
   at System.DirectoryServices.DirectoryEntry.Bind()
   at System.DirectoryServices.DirectoryEntry.get_AdsObject()
   at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
   at System.DirectoryServices.DirectorySearcher.FindOne()
   at Microsoft.Crm.ObjectModel.SystemUserServiceInternal`1.CheckUserUnderRootPath(String domainAccountName, ExecutionContext context)
   at Microsoft.Crm.ObjectModel.SystemUserServiceInternal`1.CreateInternal(Guid organizationId, IBusinessEntity systemuser, ExecutionContext context)
   at Microsoft.Crm.ObjectModel.SystemUserServiceInternal`1.Create(IBusinessEntity systemuser, ExecutionContext context)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
   at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IPluginExecutionContext context)
   at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
   at Microsoft.Crm.Sdk.RequestBase.Process(Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
   at Microsoft.Crm.Sdk.RequestBase.Process(CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
   at Microsoft.Crm.Sdk.CrmServiceInternal.Execute(RequestBase request, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
   at Microsoft.Crm.Sdk.Crm2007.CrmService.Execute(Request request)
   --- End of inner exception stack trace ---

Answer 1:

该0x80072020错误与在AD通用“拒绝访问”。

根据您的配置,你可以尝试通过修改以下找准问题:

1)授予“代理”选项,使用Active Directory用户和计算机的应用程序池的用户。 2)一个web.config添加到MSCRMServices文件夹,并打开模拟在诸如:

<身份冒充= “真” 的userName = “MYDOMAIN \鲍勃” 密码= “助洗剂”/>



文章来源: Unable to add user with CrmService API in Dynamics CRM