首页 > 解决方案 > MS Graph Explorer 不返回扩展的单值扩展属性

问题描述

我无法使用 MS Graph Explorer 扩展日历事件的单值扩展属性。

这是我输入的查询字符串:(我对空格进行了 URL 编码)

https://graph.microsoft.com/v1.0/me/events('AAKT1CZJAAA=')?$expand=singleValueExtendedProperties($filter=id%20eq%20'String%20{00020329-0000-0000-C000-000000000046}%20Name%20MyCustomData')

返回以下错误:

{
"error": {
    "code": "BadRequest",
    "message": "Parsing Select and Expand failed.",
    "innerError": {
        "request-id": "54e97d07-1c6d-4cb5-8fd0-385dae4cb5b2",
        "date": "2020-05-28T14:31:44"
    }
}

我无法真正检测到语法可能有什么问题。

我使用 OutlookSpy 来确保我有正确的 guid。

有任何想法吗?

注意 为了验证我是否使用了正确的 ID,我使用了以下查询。它运行成功。

https://graph.microsoft.com/v1.0/me/events('AAKT1CZJAAA=')?$filter=singleValueExtendedProperties/any(ep:ep/id%20eq%20'Integer%20{00020329-0000-0000-C000-000000000046}%20Name%20MyCustomData'%20and%20cast(ep/value,%20Edm.Int32)%20eq%2063531)

标签: outlookmicrosoft-graph-apimapimicrosoft-graph-calendar

解决方案


你有没有深究?在第一个获取请求中,您正在寻找字符串类型的 id,但在有效的请求中,您正在寻找整数。

String%20{00020329-0000-0000-C000-000000000046}%20Name%20MyCustomData')

接着:

Integer%20{00020329-0000-0000-C000-000000000046}%20Name%20MyCustomData'%20and%20cast(ep/value,%20Edm.Int32)%20eq%2063531)

推荐阅读