【问题标题】:I have a problem with Azure AD - SAML 2.0 configuration我对 Azure AD - SAML 2.0 配置有疑问
【发布时间】:2019-06-25 14:49:22
【问题描述】:
我需要帮助我在 Azure 中为 Active Directory SAML 2.0 配置标识符(实体 ID)和回复 URL,我不知道如何配置它们
我尝试为它们设置一些值,但收到了以下消息:
AADSTS750054:SAMLRequest 或 SAMLResponse 必须作为查询出现
SAML 重定向绑定的 HTTP 请求中的字符串参数。
关于如何使它工作的任何想法?
【问题讨论】:
标签:
azure-active-directory
saml-2.0
【解决方案1】:
如何启用 Azure AD SAML 身份验证取决于您使用的 SAML 库。 entityID和Reply URL一般是你在AAD中注册的应用的APP ID URI和Reply URL。正确配置库后,它将自动帮助您生成 SAMLRequest。
下面是使用Sustainsys.Saml2库的配置示例:
<!--entityId is APP ID URI of your registered application in AAD; Return URL is Reply URL-->
<sustainsys.saml2 entityId="https://www.contoso.org/checkresourceapp"
returnUrl="http://localhost:54664/"
>
<nameIdPolicy allowCreate="true" format="Persistent"/>
<identityProviders>
<add entityId="https://sts.windows.net/<your tenant id>/"
metadataLocation="https://login.microsoftonline.com/<your tenant id>/FederationMetadata/2007-06/FederationMetadata.xml"
loadMetadata = "true"
allowUnsolicitedAuthnResponse="true"
signOnUrl="https://login.microsoftonline.com/<your tenant id>"
binding="HttpRedirect">
</add>
</identityProviders>
<federations>
<add metadataLocation="https://login.microsoftonline.com/<your tenant id>/FederationMetadata/2007-06/FederationMetadata.xml" allowUnsolicitedAuthnResponse = "false" />
</federations>
</sustainsys.saml2>
完整解释请参考https://saml2.sustainsys.com/en/2.0/configuration.html
【解决方案2】:
您在这里使用了错误的 URL。对于 IDP 发起的 URL,请从 Azure AD 应用程序属性选项卡中找到“User Access URL”。 然后您可以在浏览器中使用该 URL,它将执行 SSO。另外,用户也可以登录到访问面板https://myapps.microsoft.com,然后单击应用程序磁贴以执行 SSO。在 Azure 门户中访问 Azure Active Directory -> Enterprise Apps -> Search your app -> Click on the app -> Properties page -> User Access URL