某些用户在组织 export/import 后无法登录 CRM:"No Microsoft Dynamics CRM user exists with the specified domain name"

Certain users are unable to login to CRM after organization export/import: "No Microsoft Dynamics CRM user exists with the specified domain name"

在导出和导入 CRM 组织并进行用户映射后,某些用户无法登录到 CRM。他们收到以下错误:

No Microsoft Dynamics CRM user exists with the specified domain name and user ID

A Microsoft Dynamics CRM user record does not exist with the specified domain name and user ID.

在 CRM 中查看受影响的系统用户时,他们似乎都具有正确的安全角色。重新分配安全角色、停用和重新激活用户或重新键入他们的域名没有任何效果。

此问题仅影响大约 1% 的用户。其余的都可以正常登录。

通过将域名更改为未使用的域用户名、使用原始域名创建新系统用户并将所有记录重新分配给新系统用户,我已经能够解决单个用户的问题。

此方法需要 Active Directory 中未使用的用户。我该如何解决问题的根本原因?

在某些情况下,我遇到过 CRM 数据库中为用户存储的 SID 与 Active Directory 中用户的 SID 不一致的情况。您可以通过以下方式更正该问题:

Select CRM中用户的SID:

select DomainName,ActiveDirectoryGuid,AuthInfo,A.UserId from 
MSCRM_CONFIG.dbo.SystemUserOrganizations O
join MSCRM_CONFIG.dbo.SystemUserAuthentication A on A.UserId=O.UserId
join YourOrg_MSCRM.dbo.SystemUserBase B on B.SystemUserId=O.CrmUserId

您可以在上面的 SQL 中添加一个 where 子句,以仅向您感兴趣的用户显示。

Select Active Directory 中特定用户的 SID

使用 PowerShell 的 Active Directory 模块 select 来自 Active Directory 的给定用户的 SID:

Get-ADUser -Filter {SamAccountName -eq 'YourUserName'}

将 Active Directory 中的 SID 与 CRM 中的 SID 进行比较。如果两者不同,您可以更正问题:

更新 CRM 中的 SID

免责声明:与往常一样,不支持对 CRM 表进行任何直接更改。

将 SystemUserAuthentication 中的 SID 更新为来自 AD 的正确 SID,之后用户应该能够再次登录。