如何解决Dynamics 365的错误:用户身份验证无效,MSIS0006

关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复246或者20170312可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyong.me 。

这两天突然访问不了我的部署在Azure云虚拟机中的Dynamics 365环境了,我这个环境做了IFD,访问报错的URL是:
https://auth.luoyong.me/_common/error/errorhandler.aspx?BackUri=https%3a%2f%2fsts.luoyong.me%3a444%2fadfs%2fls%2f%3fwa%3dwsignin1.0%26wtrealm%3dhttps%253a%252f%252fdemo.luoyong.me%252f%26wctx%3drm%253d1%2526id%253db66cf1ab-1667-442e-ba4d-255dd0372b51%2526ru%253dhttps%25253a%25252f%25252fdemo.luoyong.me%25252fdefault.aspx%26wct%3d2017-03-11T23%253a43%253a51Z%26wauth%3durn%253aoasis%253anames%253atc%253aSAML%253a1.0%253aam%253apassword&ErrorCode=&Parm0=%0d%0a%0d%0a%E9%94%99%E8%AF%AF%E8%AF%A6%E7%BB%86%E4%BF%A1%E6%81%AF%3a%20ID4175%3a%20The%20issuer%20of%20the%20security%20token%20was%20not%20recognized%20by%20the%20IssuerNameRegistry.%20To%20accept%20security%20tokens%20from%20this%20issuer%2c%20configure%20the%20IssuerNameRegistry%20to%20return%20a%20valid%20name%20for%20this%20issuer.&RequestUri=%2fdefault.aspx&user_lcid=2052 
报错信息翻译过来是:错误详细信息: 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.&RequestUri=/default.aspx&user_lcid=2052"
截图如下:
 
登录到服务器,在服务器的事件查查看器 > 应用程序和服务日志 > AD FS > Admin 的错误信息如下:
无法打开已配置的 WS-Trust 终结点。 
其他数据 
地址: https://sts.luoyong.me:444/adfs/services/trust/2005/windowstransport 
模式:    WindowsTransport 
错误: 
MSIS0006: 没有为 AD FS 服务帐户注册服务主体名称。 
 
搜索了一下,很多文章都是讲要设置SPN了,我不大懂,跟着设置了一通,重启了AD FS服务还是没有效果。后来找到了另外一篇文章,Edin Muheljic 的 Microsoft Dynamics CRM error: The issuer of the security token was not recognized by the IssuerNameRegistry – Solved ,虽然我提供了链接,可是如果从中国大陆打开的话,界面如下。
 
文章当然是英文的,我这里不啰嗦,直接说说怎么看怎么做。打开AD FS管理器,如果看到有过期或者即将过期的证书,那就是十有八九是这个原因了,我的就是:
 
解决方法简单,打开CRM的部署管理器,点击 配置基于声明的身份验证 这个链接。
 
 所有的步骤都点击下一步,不用做任何更改,关闭以后还是打开AD FS管理器 > 信赖方信任,对两个CRM开头的信赖方信任都做同样的操作,就是右击,选择 从联合元数据更新 。
 
 在弹出的对话框中点击 更新 按钮即可。
 
最后是重启IIS和 AD FS服务,访问正常。
 
原文地址:https://www.cnblogs.com/luoyong0201/p/Dynamics_365_Solve_MSIS0006.html