解决SystemForCrossDomainIntentityManagementBadresponse

发布于 2025-01-22 17:48:25 字数 2279 浏览 3 评论 0 原文

我已经实现了此 scim参考代码在我们的应用程序中。

我实施的代码确实传递了此用户的所有测试集合 Postman link 。我的 scim api 也被Azure接受为用户的有效终点。

真正的问题始于我尝试从 Azure Portal 为用户执行按需提供

我收到以下错误代码: SystemForossDomainIntentityManagementbonsebadese

错误消息:响应中缺少所需的属性。缺失的属性是标识符。这是响应:

{
    "result": {
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {},
        "active": true,
        "displayName": "Chris Brown",
        "emails": [
            {
                "type": "work",
                "primary": true,
                "value": "[email protected]"
            }
        ],
        "meta": {
            "resourceType": "User",
            "created": "2022-04-21T05:27:03.774148Z",
            "lastModified": "2022-04-21T05:27:03.774148Z",
            "version": null,
            "location": null
        },
        "name": {
            "formatted": "Chris Brown",
            "familyName": "Brown",
            "givenName": "Chris"
        },
        "preferredLanguage": "en-GB",
        "userName": "[email protected]",
        "externalId": "chris.brown",
        "id": "a99b4da2-ab2f-49fc-8a01-4a9ce251fbdb",
        "schemas": [
            "urn:ietf:params:scim:schemas:core:2.0:User",
            "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
        ]
    },
    "targetUrl": null,
    "success": true,
    "error": null,
    "unAuthorizedRequest": false,
}

您可以清楚地看到,我在响应中添加了 id (标识符)。现在,我对错误消息传达的内容感到困惑。

请帮忙。

清晰了解Azure Portal上错误消息的图像:

”在此处输入图像描述”

I have implemented this SCIM reference code in our application.

My implemented code did pass all the test collection of Users present in this postman link. My SCIM Api was also accepted by Azure as the valid endpoint for Users.

The real problem starts when I tried to perform Provision on Demand from the Azure portal for a User.

I received the following error code: SystemForCrossDomainIdentityManagementBadResponse

Error Message: A required attribute is missing from a response. The missing attribute is Identifier. Here is the response:

{
    "result": {
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {},
        "active": true,
        "displayName": "Chris Brown",
        "emails": [
            {
                "type": "work",
                "primary": true,
                "value": "[email protected]"
            }
        ],
        "meta": {
            "resourceType": "User",
            "created": "2022-04-21T05:27:03.774148Z",
            "lastModified": "2022-04-21T05:27:03.774148Z",
            "version": null,
            "location": null
        },
        "name": {
            "formatted": "Chris Brown",
            "familyName": "Brown",
            "givenName": "Chris"
        },
        "preferredLanguage": "en-GB",
        "userName": "[email protected]",
        "externalId": "chris.brown",
        "id": "a99b4da2-ab2f-49fc-8a01-4a9ce251fbdb",
        "schemas": [
            "urn:ietf:params:scim:schemas:core:2.0:User",
            "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
        ]
    },
    "targetUrl": null,
    "success": true,
    "error": null,
    "unAuthorizedRequest": false,
}

As you can clearly see, I have added id (the Identifier) to the response. Now I am confused about what the error message conveys.

Please help.

An image for clear understanding of the error message at Azure Portal:

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

遇见了你 2025-01-29 17:48:25

您的响应与SCIM规格不一致。对帖子的响应(鉴于屏幕截图,我认为这就是事实)正在将实际响应嵌套在“结果”对象的内部,该对象根本无法在规格中定义。

看看有关帖子正确响应的示例。

同样,在您的响应中,在“请求”属性/对象之外的响应中有许多属性,这些属性在规格中未定义,因此不合规。这些是:

“ targeturl”:null,
“成功”:是的,
“错误”:null,
“未授权的雷克斯”:false,

Your response doesn't align with the SCIM spec. The response to the POST (I think that's what it is, given the screenshot) is nesting the actual response inside of a "Result" object that is not defined in the spec at all.

Take a look at https://datatracker.ietf.org/doc/html/rfc7644#section-3.3 for an example of a correct response to a POST.

Also, there are a number of attributes in your response, outside of the "request" attribute/object, that aren't defined in the spec and are therefore noncompliant. Those would be:

"targetUrl": null,
"success": true,
"error": null,
"unAuthorizedRequest": false,

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文