Microsoft graph api Get/me/events/{id}返回不正确的日历对象
我试图从Microsoft graph api Get/me/events/{id}返回不正确的日历对象,microsoft-graph-api,microsoft-graph-calendar,Microsoft Graph Api,Microsoft Graph Calendar,我试图从/me/events?$expand=calendar端点获取事件列表 并返回正确的日历对象作为响应 然而,当我试图获取一个特定事件时,我收到了一个不同的日历。 使用的API:/me/events/{id}?$expand=calendar 用户有4个日历(使用/me/calendars验证)。 并且从/me/events/{id}?$expand=calendar接收的日历id与其中任何一个都不匹配 编辑 以下是更多澄清的回复 结束点列出所有日历 https://graph.micro
/me/events?$expand=calendar
端点获取事件列表
并返回正确的日历对象作为响应
然而,当我试图获取一个特定事件时,我收到了一个不同的日历。
使用的API:/me/events/{id}?$expand=calendar
用户有4个日历(使用/me/calendars验证)。
并且从/me/events/{id}?$expand=calendar
接收的日历id与其中任何一个都不匹配
编辑
以下是更多澄清的回复
https://graph.microsoft.com/v1.0/me/calendars
答复:
{
"value": [
{
"id": "<CALENDAR_ID_1>",
"name": "Calendar",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": true,
"canViewPrivateItems": true,
"canEdit": true,
"owner": {
"name": "<Name>",
"address": "<Email>"
}
},
{
"id": "<CALENDAR_ID_2>",
"name": "Birthdays",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": false,
"canViewPrivateItems": true,
"canEdit": false,
"owner": {
"name": "TestVoIP 1",
"address": "<Email>"
}
},
....
]
}
{
"value": [
{
"id": "<EVENT_ID_1>",
... some other properties
"calendar": {
"id": "<CALENDAR_ID_1>", // Note that this is the calendar id for EVENT_ID_1
"name": "Calendar",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": true,
"canViewPrivateItems": true,
"canEdit": true,
"owner": {
"name": "<Name>",
"address": "<Email>"
}
},
},
{
"id": "<EVENT_ID_2>",
... some other properties
"calendar": {
"id": "<CALENDAR_ID_1>",
"name": "Calendar",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": true,
"canViewPrivateItems": true,
"canEdit": true,
"owner": {
"name": "<Name>",
"address": "<Email>"
}
},
},
...
]
}
{
"id": "<EVENT_ID_1>",
... some other properties
"calendar": {
"id": "<DIFFERENT_CALENDAR_ID>", // Note that this is entirely different calendar id than we noted in list of events response AND its not available in list of calendars response too
"name": null,
"color": "auto",
"changeKey": null,
"canShare": false,
"canViewPrivateItems": false,
"canEdit": false,
"owner": null
}
}
答复:
{
"value": [
{
"id": "<CALENDAR_ID_1>",
"name": "Calendar",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": true,
"canViewPrivateItems": true,
"canEdit": true,
"owner": {
"name": "<Name>",
"address": "<Email>"
}
},
{
"id": "<CALENDAR_ID_2>",
"name": "Birthdays",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": false,
"canViewPrivateItems": true,
"canEdit": false,
"owner": {
"name": "TestVoIP 1",
"address": "<Email>"
}
},
....
]
}
{
"value": [
{
"id": "<EVENT_ID_1>",
... some other properties
"calendar": {
"id": "<CALENDAR_ID_1>", // Note that this is the calendar id for EVENT_ID_1
"name": "Calendar",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": true,
"canViewPrivateItems": true,
"canEdit": true,
"owner": {
"name": "<Name>",
"address": "<Email>"
}
},
},
{
"id": "<EVENT_ID_2>",
... some other properties
"calendar": {
"id": "<CALENDAR_ID_1>",
"name": "Calendar",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": true,
"canViewPrivateItems": true,
"canEdit": true,
"owner": {
"name": "<Name>",
"address": "<Email>"
}
},
},
...
]
}
{
"id": "<EVENT_ID_1>",
... some other properties
"calendar": {
"id": "<DIFFERENT_CALENDAR_ID>", // Note that this is entirely different calendar id than we noted in list of events response AND its not available in list of calendars response too
"name": null,
"color": "auto",
"changeKey": null,
"canShare": false,
"canViewPrivateItems": false,
"canEdit": false,
"owner": null
}
}
{
“价值”:[
{
“id”:“,
…其他一些属性
“日历”:{
“id”:“”//请注意,这是事件\u id\u 1的日历id
“名称”:“日历”,
“颜色”:“自动”,
“changeKey”:“,
“canShare”:没错,
“canViewPrivateItems”:true,
“canEdit”:没错,
“所有者”:{
“名称”:“,
“地址”:”
}
},
},
{
“id”:“,
…其他一些属性
“日历”:{
“id”:“,
“名称”:“日历”,
“颜色”:“自动”,
“changeKey”:“,
“canShare”:没错,
“canViewPrivateItems”:true,
“canEdit”:没错,
“所有者”:{
“名称”:“,
“地址”:”
}
},
},
...
]
}
https://graph.microsoft.com/v1.0/me/events/?$expand=日历
答复:
{
"value": [
{
"id": "<CALENDAR_ID_1>",
"name": "Calendar",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": true,
"canViewPrivateItems": true,
"canEdit": true,
"owner": {
"name": "<Name>",
"address": "<Email>"
}
},
{
"id": "<CALENDAR_ID_2>",
"name": "Birthdays",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": false,
"canViewPrivateItems": true,
"canEdit": false,
"owner": {
"name": "TestVoIP 1",
"address": "<Email>"
}
},
....
]
}
{
"value": [
{
"id": "<EVENT_ID_1>",
... some other properties
"calendar": {
"id": "<CALENDAR_ID_1>", // Note that this is the calendar id for EVENT_ID_1
"name": "Calendar",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": true,
"canViewPrivateItems": true,
"canEdit": true,
"owner": {
"name": "<Name>",
"address": "<Email>"
}
},
},
{
"id": "<EVENT_ID_2>",
... some other properties
"calendar": {
"id": "<CALENDAR_ID_1>",
"name": "Calendar",
"color": "auto",
"changeKey": "<changeKey>",
"canShare": true,
"canViewPrivateItems": true,
"canEdit": true,
"owner": {
"name": "<Name>",
"address": "<Email>"
}
},
},
...
]
}
{
"id": "<EVENT_ID_1>",
... some other properties
"calendar": {
"id": "<DIFFERENT_CALENDAR_ID>", // Note that this is entirely different calendar id than we noted in list of events response AND its not available in list of calendars response too
"name": null,
"color": "auto",
"changeKey": null,
"canShare": false,
"canViewPrivateItems": false,
"canEdit": false,
"owner": null
}
}
{
“id”:“,
…其他一些属性
“日历”:{
“id”:“”//请注意,这与我们在事件列表响应中注意到的日历id完全不同,在日历列表响应中也不可用
“名称”:空,
“颜色”:“自动”,
“changeKey”:空,
“canShare”:错,
“canViewPrivateItems”:false,
“canEdit”:错误,
“所有者”:空
}
}