簡體   English   中英

Azure B2C,IDP 啟動的自定義提供程序配置上的對象引用未設置錯誤

[英]Azure B2C, Object reference not set error on IDP initiated custom provider configuration

我正在處理一個客戶項目,我們正在驗證客戶的 IDP 解決方案是否有問題,或者這是 B2C 配置項。 在驗證中,我將 Azure AD(不同訂閱)連接到另一個配置上的 Azure B2C 實例。 處理進行得很順利,除了最后我們得到的對象引用未設置為對象的實例。

Azure AD 正在將 SSO(IDP 發起的會話)初始化為 B2C,以模擬客戶的解決方案將執行的操作。

我一直試圖追蹤對象引用是什么,但沒有任何運氣。 任何幫助表示贊賞。

37
{
    "Kind": "HandlerResult",
    "Content": {
        "Result": true,
        "RecorderRecord": {
            "Values": [
                {
                    "Key": "EnabledForUserJourneysTrue",
                    "Value": {
                        "Values": [
                            {
                                "Key": "CurrentStep",
                                "Value": 5
                            },
                            {
                                "Key": "TechnicalProfileEnabled",
                                "Value": {
                                    "EnabledRule": "Always",
                                    "EnabledResult": true,
                                    "TechnicalProfile": "SAMLAssert"
                                }
                            }
                        ]
                    }
                }
            ]
        },
        "PredicateResult": "True"
    }
}
38
{
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.IsSendClaimsProtocolAnApiHandler"
}
39
{
    "Kind": "HandlerResult",
    "Content": {
        "Result": true,
        "PredicateResult": "False"
    }
}
40
{
    "Kind": "Predicate",
    "Content": "Web.TPEngine.StateMachineHandlers.IsPresentationTokenGeneratedHandler"
}
41
{
    "Kind": "HandlerResult",
    "Content": {
        "Result": true,
        "PredicateResult": "False"
    }
}
42
{
    "Kind": "Action",
    "Content": "Web.TPEngine.StateMachineHandlers.PresentationTokenGenerationHandler"
}
43
{
    "Kind": "FatalException",
    "Content": {
        "Time": "10:04 PM",
        "Exception": {
            "Kind": "Handled",
            "HResult": "80004003",
            "Message": "Object reference not set to an instance of an object.",
            "Data": {}
        }
    }
}   

我在合作伙伴應用程序和我們的 Azure B2C 之間通過 SP 啟動的自定義策略設置收到了同樣的錯誤,並且能夠解決它。 對於不熟悉自定義策略故障排除的任何人,您可以在App Insights 中閱讀這些跟蹤日志。

服務提供者的元數據文件包含一個 AssertionConsumerService 元素,看起來像

<AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="[SP login response endpoint]"/> 

通過修改此元素以包含“index”和“isDefault”,錯誤消失了:

<AssertionConsumerService index="0" isDefault="true" Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="[SP login response endpoint]"/>

我從Microsoft 的 SAML 測試應用程序元數據中獲取了這些屬性。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM