无法使用“ Jobrole”创建扩展属性。邮差

发布于 2025-02-14 00:46:44 字数 956 浏览 0 评论 0 原文

我想将“ Jobrole”添加为Postman的扩展属性。之后,我想与用户映射并在令牌中获取该属性。

我可以使用 application.readwrite 权限的访问令牌。有了该令牌,我试图将其称为:

查询

https://graph.microsoft.com/v1.0/applications/appID/extensionProperties

body

{
    "name": "jobRole",
    "dataType": "String",
    "targetObjects": [
        "User"
    ]
}

即使我有一个资源,我也会给出错误,并且我给出了正确的appid。

错误

{
    "error": {
        "code": "Request_ResourceNotFound",
        "message": "Resource '2d3c554a-bf16-4b39-80d9-9ff210d6c822' does not exist or one of its queried reference-property objects are not present.",
        "innerError": {
            "date": "2022-07-08T07:19:19",
            "request-id": "c2e96c65-99e3-4387-811b-99282e0b3a8a",
            "client-request-id": "665e60ce-357e-f23d-50f2-4c636bb82bd1"
        }
    }
}

有人可以帮助我缺少作品吗?

I want to add 'jobRole' as an extension attribute from Postman. After that, I want to map it with user and get that attribute in the token.

I have access token with Application.ReadWrite permission. With that token, I tried to call this:

QUERY

https://graph.microsoft.com/v1.0/applications/appID/extensionProperties

BODY

{
    "name": "jobRole",
    "dataType": "String",
    "targetObjects": [
        "User"
    ]
}

It is giving error even though I have a resource existing and I'm giving the correct AppId.

ERROR

{
    "error": {
        "code": "Request_ResourceNotFound",
        "message": "Resource '2d3c554a-bf16-4b39-80d9-9ff210d6c822' does not exist or one of its queried reference-property objects are not present.",
        "innerError": {
            "date": "2022-07-08T07:19:19",
            "request-id": "c2e96c65-99e3-4387-811b-99282e0b3a8a",
            "client-request-id": "665e60ce-357e-f23d-50f2-4c636bb82bd1"
        }
    }
}

Can someone help me with missing piece?

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

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

发布评论

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

评论(1

云柯 2025-02-21 00:46:44

我试图在环境中复制相同的错误,并获得了与以下相同的错误:

“在此处输入图像描述”

请注意,您需要通过 应用程序对象ID 而不是应用程序ID:

此处能够成功地创建扩展属性,如下所示:

“

参考:

创建ExtensionProperty -Microsoft Graph V1.0 |微软文档

I tried to reproduce the same in my environment and got the same error as below:

enter image description here

Please note that, you need to pass Application Object ID instead of Application ID:

enter image description here

When I passed the Application Object ID, I was able create the extension property successfully like below:

enter image description here

Reference:

Create extensionProperty - Microsoft Graph v1.0 | Microsoft Docs

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