0

我有一个在 Azure 虚拟机上运行的 Sharepoint 站点。现在我想向 Azure AD 用户验证我的共享点站点。

为此,我遵循了以下链接,但登录后出现错误。

使用 Microsoft Azure Active Directory 进行 SharePoint 2013 身份验证

我已经按照参考链接上的方式实现了,但仍然面临错误。当我从浏览器访问我的网址时,它会询问我您要通过哪个登录。

在此处输入图像描述

然后在选择 ACS Provider 时,它会将我重定向到 office365 登录。在我提交我的凭据后,它会将我重定向到

https://testvm.cloudapp.net/_trust/

并得到错误。所以我检查了sharepoint日志,发现下面的错误。

找不到请求 Uri urn:sharepoint:spvms 的站点查找信息。

SPAudienceValidator:Audience uri 'urn:sharepoint:spvms 对上下文无效。

获取异常 Microsoft.IdentityModel.Tokens.FailedAuthenticationException 的错误消息:无法验证受众 URI。

SPSaml11SecurityTokenHandler:请求“ https://testvm.cloudapp.net/_trust/ ”的受众验证失败,具有以下受众URI:“urn:sharepoint:spvms”。

访问 /_trust/ 时出现应用程序错误,错误=无法验证受众 URI。 在 Microsoft.IdentityModel.Tokens.SecurityTokenHandlerCollection.ValidateToken (SecurityToken token) 在 Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.ValidateToken(SecurityToken token)在
Microsoft.SharePoint.IdentityModel.SPSaml11SecurityTokenHandler.ValidateConditions(SamlConditions conditions, Boolean enforceAudienceRestriction) 。 Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequest 请求)上的IdentityModel.Web.TokenReceiver.AuthenticateToken(SecurityToken 令牌,布尔型 ensureBearerToken,字符串 endpointUri )




在 Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args)
在 Microsoft.SharePoint.IdentityModel.SPFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs eventArgs)
在 System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep System.Web.HttpApplication.ExecuteStep 处的.Execute()
(IExecutionStep 步骤,Boolean& completedSynchronously)

4

2 回答 2

0

听起来 Azure AD 的身份验证工作正常,并且重定向到 SharePoint 工作正常。使用 Get-SPTrustedIdentityTokenIssuer 并验证领域...看起来从 Azure ACS 发送的领域与您在 PowerShell 中使用的领域不匹配。

于 2015-03-24T12:09:35.120 回答
0

我有一个可行的解决方案。问题是您不应该使用它New-MsolServicePrincipal来连接 Azure AD 和 ACS。

相反,您将 ACS 作为应用程序添加到 Azure Id

在此处输入图像描述

然后查看其端点并复制链接 FEDERATION METADATA DOCUMENT

在此处输入图像描述

将复制的链接粘贴到 ACS 中您的身份提供者的 URL 字段中

在此处输入图像描述

注意:如果您使用过New-MsolServicePrincipal,则需要使用Remove-MsolServicePrincipal. 否则 Azure 将不允许您使用相同的 url 注册应用程序。

于 2015-12-31T17:48:20.473 回答