首页 > 解决方案 > EWS 扩展属性到 Microsoft Graph 扩展属性

问题描述

有人可以告诉我如何将 EWS 扩展属性转换为 Microsoft Graph 扩展属性定义,因为我无法访问使用 EWS 创建的约会的单值扩展属性。当我通过 Graph API 创建约会时,我可以访问定义的属性。
这是我的 EWS 属性定义:

ExtendedPropertyDefinition myPropertyDefinition = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.PublicStrings, 1001, MapiPropertyType.String);

我尝试了以下变体,但没有一个对我有用。我没有收到单值扩展属性数组。

https://graph.microsoft.com/v1.0/me/calendar/events?$expand=SingleValueExtendedProperties($filter=Id eq 'String 1001')
https://graph.microsoft.com/v1.0/me/calendar/events?$expand=SingleValueExtendedProperties($filter=Id eq 'String 0x3E9')
https://graph.microsoft.com/v1.0/me/calendar/events?$expand=SingleValueExtendedProperties($filter=Id eq 'Integer 1001')
https://graph.microsoft.com/v1.0/me/calendar/events?$expand=SingleValueExtendedProperties($filter=Id eq 'Integer 0x3E9')

我搜索了常见问题,但没有一个对我有帮助。
任何想法都会有所帮助。
谢谢。

标签: asp.netasp.net-coreexchangewebservicesmicrosoft-graph-calendar

解决方案


鉴于您的示例,您需要包含公共字符串的 GUID,因此它应该看起来像

https://graph.microsoft.com/v1.0/me/calendar/events?$expand=SingleValueExtendedProperties($filter=(Id eq 'Integer {00020329-0000-0000-C000-000000000046} Id 0x3E90'))

但是,如果您使用盖子值命名属性,则命名属性定义看起来不正确,范围应为 0x8000 和 0x8FFF https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-pst/60003704-dfa6 -476f-b782-ce8bb52a2df3

您尝试使用的该属性范围是保留的,如果您使用 PublicStrings 可能使用唯一字符串作为属性 Id 会是一个更好的主意,我很惊讶它确实有效。


推荐阅读