簡體   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