繁体   English   中英

使用谷歌工作区验证 Azure SAML 的域

[英]Verify domain for Azure SAML with google workspace

我正在尝试从 Google Workspace 将用户配置到 Azure AD,并让我的用户使用他们公司的谷歌帐户登录到 Azure 门户。 我已将我的自定义域添加到 Azure AD,并在 Google 端配置了集成。 然而,当配置工作时,当用户尝试登录 Azure 时,他们需要输入密码,而不是被重定向到谷歌以使用他们的工作区帐户。

通读文档,我已将 TXT 记录设置为使用 google 指示的 SSO url 作为DirectFedAuthUrl属性。 我已经通过不同的工具验证它确实设置为https://accounts.google.com/o/saml2/idp?idpid=xxxx 现在,我尝试使用我的自定义域在 Azure AD 中设置 SAML,它返回直接联合策略未通过某些要求的错误,并将我引导至文档。 我究竟做错了什么?

如何验证我的自定义域以便它与 Azure SAML 一起使用?

• 请检查用于发送用户进行身份验证并从google 接收令牌的身份验证URL 是否与google 的目标域相匹配,以便当用户尝试访问azure 中的应用程序时,他们会被正确重定向到google IdP。

• 此外,请检查您添加的自定义域是否在 Azure AD 中得到验证,并且您的域未通过 Azure AD 进行管理,因为如果是这种情况,则 Azure 会阻止 Azure AD 验证域支持本机 Azure 的 SAML/WS-Fed IdP 联合AD 托管域功能。

• 确保您的唯一自定义域仅在公元 Azure 年向一个租户注册,因为当前不支持通过同一租户与多个域联合。 此外,检查您在设置联盟时为 Azure AD 中使用的自定义域更新的 DNS TXT 记录是否正确设置,即,应为您在 google 套件中设置的域更新 TXT 记录,如果它是与Azure AD中使用的自定义域不同,请设置TXT记录如下: -

' fabrikam.com。 在 TXT DirectFedAuthUrl=https://fabrikamconglomerate.com/adfs '

在这种情况下,'fabrikam.com' 是注册域名,但身份验证 URL 中的域与注册域名不匹配,因此您需要在公共 DNS 注册表中更新 TXT 记录,如上所示。 此外,Microsoft 已在其官方文档中声明上述步骤存在一个已知问题,他们正在积极努力尽早解决该问题,因为将 DNS 文本记录添加到联合 IdP 的域不会取消身份验证。

请找到以下链接以获取更多信息:-

https://learn.microsoft.com/en-us/azure/active-directory/external-identities/direct-federation

这不是答案,而是更多的提示:尝试使用 powershell 获取有关 SAML 设置为何不起作用的更多诊断信息。 MS Doc 中的一些示例 powershell。

https://learn.microsoft.com/en-us/azure/active-directory/external-identities/direct-federation#to-configure-samlws-fed-idp-federation-in-azure-ad-using-powershell

因此,例如在下面,我收到了比在门户中更好的消息。 门户刚刚说“无法添加提供商”或类似内容。

PS C:\WINDOWS\system32> New-AzureADExternalDomainFederation -ExternalDomainName $domainName  -FederationSettings $federationSettings -verbose
New-AzureADExternalDomainFederation : Error occurred while executing NewExternalDomainFederation
Code: Request_BadRequest
Message: PassiveLogOnUri is not supported as it does not match the external domain: MYTESTDOMAIN.com or it is not from one of the supported third party identity providers. To verify the PassiveLogOnUri, please add the PassiveLogOnUri in the DNS TXT record like this
    DirectFedAuthUrl=https://MYTESTB2CTENANT.b2clogin.com/MYTESTB2CTENANT.onmicrosoft.com/B2C_1A_SAMLIdPsignup_signin/samlp/sso/login. 

paramName: passiveLogOnUri, paramValue:
    https://MYTESTB2CTENANT.b2clogin.com/MYTESTB2CTENANT.onmicrosoft.com/B2C_1A_SAMLIdPsignup_signin/samlp/sso/login, objectType: System.String
    RequestId: <some guid>
    DateTimeStamp: Wed, 06 Oct 2021 05:21:27 GMT
    Details: PropertyName  - passiveLogOnUri, PropertyErrorCode  - PassiveLogOnUriNotSupported
    HttpStatusCode: BadRequest
    HttpStatusDescription: Bad Request
    HttpResponseStatus: Completed
    At line:1 char:1
    + New-AzureADExternalDomainFederation -ExternalDomainName $domainName   ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [New-AzureADExternalDomainFederation], ApiException
        + FullyQualifiedErrorId : Microsoft.Open.AzureADBeta.Client.ApiException,Microsoft.Open.AzureADBeta.PowerShell.NewExternalDomainFederation

多亏了错误消息,我被引导更新 DNS 记录,但确实允许我注册 SAML IDP(在我的例子中是 Azure B2C)。

旁注:尽管现在能够成功注册,但 B2C 作为 SAML IDP 实际上还没有为我工作,我认为我的问题可能是这样的:

在此处输入图像描述

我想我的下一个选择是:

如果认证URL为https://fabrikam.comhttps://sts.fabrikam.com/adfs (同域主机),则无需DNS更改。

但这需要一个 Azure 前门,我现在不想设置它https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-domain?pivots=b2c-custom-政策

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM