查询可编辑的用户日历 returns 个不可编辑的日历
Querying editable user calendars returns non-editable calendars
查询可编辑的用户日历时,即使用 canEdit+eq+true
OData 过滤器子句,我收到的是不可编辑的日历。
这里是 REST 查询端点({userId}
替换为任何现有的用户 GUID):
https://graph.microsoft.com/v1.0/users/{userId}/calendars?$filter=canEdit+eq+true
这里是响应结果:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('{userId}')/calendars",
"value": [
{
"id": "some-id",
"name": "Jours fériés - France",
"canEdit": false,
},
{
"id": "some-other-id",
"name": "Anniversaires",
"canEdit": false,
}
]
}
当查询反向 属性,即不可编辑的日历时,我收到可编辑的日历作为响应负载:
下面是 REST 查询:
https://graph.microsoft.com/v1.0/users/{userId}/calendars?$filter=canEdit+eq+false
下面是响应结果:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('{userId}')/calendars",
"value": [
{
"id": "some-id",
"name": "Calendar",
"canEdit": true,
}
]
}
请注意,我从两个响应结果中省略了不相关的字段。
是否存在已知问题或者我是否误解了 canEdit
属性?
好吧,根据 this,这是已知问题。
解决方法是使用 canEdit eq false
检索可编辑的日历。
但是我有点害怕。
查询可编辑的用户日历时,即使用 canEdit+eq+true
OData 过滤器子句,我收到的是不可编辑的日历。
这里是 REST 查询端点({userId}
替换为任何现有的用户 GUID):
https://graph.microsoft.com/v1.0/users/{userId}/calendars?$filter=canEdit+eq+true
这里是响应结果:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('{userId}')/calendars",
"value": [
{
"id": "some-id",
"name": "Jours fériés - France",
"canEdit": false,
},
{
"id": "some-other-id",
"name": "Anniversaires",
"canEdit": false,
}
]
}
当查询反向 属性,即不可编辑的日历时,我收到可编辑的日历作为响应负载:
下面是 REST 查询:
https://graph.microsoft.com/v1.0/users/{userId}/calendars?$filter=canEdit+eq+false
下面是响应结果:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('{userId}')/calendars",
"value": [
{
"id": "some-id",
"name": "Calendar",
"canEdit": true,
}
]
}
请注意,我从两个响应结果中省略了不相关的字段。
是否存在已知问题或者我是否误解了 canEdit
属性?
好吧,根据 this,这是已知问题。
解决方法是使用 canEdit eq false
检索可编辑的日历。
但是我有点害怕。