我是微软Dynamics 365 & Power Platform方面的工程师罗勇,也是2015年7月到2018年6月连续三年Dynamics CRM/Business Solutions方面的微软最有价值专家(Microsoft MVP),欢迎关注我的微信公众号 MSFTDynamics365erLuoYong ,回复389或者20200120可方便获取本文,同时可以在第一间得到我发布的最新博文信息,follow me!
今天我登录自己的Dynamics 365 Customer Engagement V9.0版本报错,如下:
用JavaScript的 decodeURIComponent 解开,意思是:
错误详细信息: ID4175: The issuer of the security token was not recognized by the IssuerNameRegistry. To accept security tokens from this issuer, configure the IssuerNameRegistry to return a valid name for this issuer.
打开我服务器的 AD FS管理器一看,SSL证书到期了,自动生成了自签名的新证书。
根据我的文档 为实施了IFD的Dynamics 365更换自签名的SSL证书以符合Chrome的要求 进行更换。
先把证书导入到如下Personal位置:
然后将导入后的证书不带私钥导出
然后将刚才导出的证书导入 Trusted Root Certification Authorities 这个位置。
输入MMC打开证书控制台,导航到 Certificates > Personal > Certificates ,右击新导入的证书,选择 All Tasks > Manage Private Keys ...
授予 CRMAppPool 应用程序的运行账号对该证书的读取权限,还有就是AD FS服务运行账号对该证书也要有读取权限。
然后为 Microsoft Dynamics CRM 这个IIS站点更换绑定的证书为新的证书,并重启下IIS。
然后打开AD FS管理器,点击右边的 【Set Service Communications Certificate ...】,选择新证书,并点击【OK】按钮。
然后用管理员身份打开Power Shell,执行命令:Set-ADFSProperties -AutoCertificateRollover $false
点击AD FS管理器右边的 【Add Token-Signing Certificate...】,选择新导入的证书点击【OK】按钮。
点击AD FS管理器右边的 【Add Token-Decrypting Certificate...】,选择新导入的证书点击【OK】按钮。
然后我新添加的Token-decrypting 和 Token-signing 证书设置为主证书,也就是右击证书,选择【Set as Primary】。一般我为了干净整洁,我还会将不用的证书删除掉,你可以不做。
弹出对话框提示(Setting this certificate to be the primary token-signing certificate will break the trust relationship with any relying party that does not have this certificate. Do you want to continue?)的话选择【Yes】。
然后打开Dynamics 365部署管理器,点击【配置基于声明的身份验证】,大部分步骤不用变,但是证书一定要确保选择的是新证书。
然后就是更新之前使用该证书的信赖方信任,我这里只有Dynamics 365 Customer Engagement使用的信赖方信任,如果你这里有多个,都更新一下。
然后看下新证书的指纹
最后执行下如下命令(Thumbprint参数的值请自行替换为自己的),重启下AD FS服务即可。可以通过 dir cert:\LocalMachine\My 命令来复制Thumbprint参数的值
Set-AdfsSslCertificate -Thumbprint 7461BFC1E57AF223E389FAF887BF78A2BB782C65
更新更详细的博文参考: Dynamics 365登录报错ID4175的解决办法(更换SSL证书) 。