Microsoft graph api 检索事件详细信息时扩展singleValueExtendedProperty不起作用
我正在尝试使用Microsoft Graph检索事件的自定义属性值。 自定义属性是由Outlook Office.js添加程序创建的 这是我的请求Microsoft graph api 检索事件详细信息时扩展singleValueExtendedProperty不起作用,microsoft-graph-api,office-js,outlook-web-addins,microsoft-graph-calendar,Microsoft Graph Api,Office Js,Outlook Web Addins,Microsoft Graph Calendar,我正在尝试使用Microsoft Graph检索事件的自定义属性值。 自定义属性是由Outlook Office.js添加程序创建的 这是我的请求 /v1.0/me/events/{id}?$expand=singleValueExtendedProperties($filter=id eq 'String {00020329-0000-0000-C000-000000000046} Name myCusProp') 这将从图形中返回成功响应,但不会返回singleValueExtendedP
/v1.0/me/events/{id}?$expand=singleValueExtendedProperties($filter=id eq 'String {00020329-0000-0000-C000-000000000046} Name myCusProp')
这将从图形中返回成功响应,但不会返回singleValueExtendedProperty
。但是,Outlook加载项仍然能够从同一事件中检索属性值
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('{id}')/events/$entity",
"@odata.etag": "W/\"SdXmMkSN8kCNtzTsQ4x1lwAD7sMWVg==\"",
"id": "{id}",
"createdDateTime": "2019-09-30T10:12:34.110571Z",
"lastModifiedDateTime": "2019-09-30T10:23:57.8338159Z",
"changeKey": "SdXmMkSN8kCNtzTsQ4x1lwAD7sMWVg==",
"categories": [],
"originalStartTimeZone": "blah blah",
"originalEndTimeZone": "blah blah Standard Time",
"iCalUId": "040000008...EBBE4999DC5A61D31AC544",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "WWW-002",
"bodyPreview": "rt",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": true,
"seriesMasterId": null,
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.office365.com/owa/?itemid=AQMkADU2OWFjYTFjLWNkMGYtNDdlNS1hNDIxLWIxYjlmY...DqyJu%2FWyzJk6m5v0MbSs7lwcASdXmMkSN8kCNtzTsQ4x1lwAAAgENA...AD7q52owAAAA%3D%3D&exvsurl=1&path=/calendar/item",
"onlineMeetingUrl": null,
"recurrence": null,
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n</head>\r\n<body>\r\n<div>rt</div>\r\n</body>\r\n</html>\r\n"
},
"start": {
"dateTime": "2019-09-19T02:30:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2019-09-19T03:00:00.0000000",
"timeZone": "UTC"
},
"location": {
"displayName": "",
"locationType": "default",
"uniqueIdType": "unknown",
"address": {},
"coordinates": {}
},
"locations": [],
"attendees": [],
"organizer": {
"emailAddress": {
"name": "Info a",
"address": "name@domain.com"
}
}
}
发件人:
id eq'字符串{00020329-0000-0000-C000-0000000000 46}名称cecp-'
使用清单*/
外接程序id是清单中的guid,此响应的自定义属性为JSON。我没有找到此链接。谢谢但是我的问题是基于这个答案的,这个答案是有效的,但是它在Array中给出了所有自定义属性在解析响应之后,你会得到一个代表整个自定义属性映射的JSON,因此,您可以访问所需的属性
myCustomPropertyResponse.myCusProp
请包含您在Office中设置值时使用的代码。js@MarcLaFleur我已经将office.js代码作为更新添加到了Question中。在这里,我通过outlook web(OWA)添加了自定义属性。如果我通过COM外接程序(Outlook插件)添加自定义属性,那么singleValueExtendedProperties可以使用问题中提到的相同图形api进行检索。您可以尝试查看是否在任何事件上设置了该属性吗/me/events?$filter=singleValueExtendedProperties/Any(ep:ep/id eq'String{00020329-0000-0000-C000-0000000000 46}Name myCusProp'和ep/value ne null)
它给了我错误https://graph.microsoft.com/v1.0/me/events?$filter=singleValueExtendedProperties/Any(ep:ep/id eq'字符串{00020329-0000-0000-C000-0000000000 46}名称myCusProp'和ep/值ne null')代码>错误为{“错误”:{“代码”:“BadRequest”,“消息”:“无效筛选子句”,“内部错误”:{“请求id”:“2805f5d3-d7ff-476a-bb17-48839603ed42”,“日期”:“2019-10-08T13:39:12”}}`
id eq 'String {00020329-0000-0000-C000-000000000046} Name cecp-<add-in id from manifest>'