Search code examples
asp.netasp.net-coreexchangewebservicesmicrosoft-graph-calendar

EWS Extended Properties to Microsoft Graph Extended Properties


Can someone tell me how to convert the EWS Extended Property to Microsoft Graph Extended Property Definiton because I can't access the single value extended properties of the appointments that are created with EWS. When i create an appointment through the Graph API i am able to access the defined property.
This is my EWS property definition:

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

I have tried the following variants but none of them is working for me. I don't receive a single value extended properties array.

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')

I searched for common problems, but none of them helped me.
Any ideas will be helpful.
Thanks.


Solution

  • Given your example you need to include the GUID for Public String so it should look like

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

    However you named property definition doesn't look correct if you for named properties using lid value the range should be 0x8000 and 0x8FFF https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-pst/60003704-dfa6-476f-b782-ce8bb52a2df3

    That property range your trying to use is reserved and I'm surprised it does work if your using PublicStrings probably using a unique string as the property Id would be a better idea.