2
votes

I'm working with the ms graph contacts api. Is it possible to filter public and private contacts using filter options?

2
Could you explain by what you mean by public vs private? - Marc LaFleur
I'm sorry, I don't follow. Are you using EWS or Graph? Either way, I'm not sure I understand what you mean by a "public contact" or a "private contact". - Marc LaFleur
In Contacts, we can mark as private contact. So using the Exchange Web Services I can filter the contacts by using SearchFilterCollection. Here is the link for contact properties - (msdn.microsoft.com/en-us/library/…) - Kalpesh
@Marc Before using EWS i can filter with sensitivity property. But that property is not available in graph. - Kalpesh
Ah, sensitivity make a lot more sense. :) - Marc LaFleur

2 Answers

1
votes

The sensitivity property isn't surfaced for Contact or Message objects in Microsoft Graph.

This property is only surfaced in the Event object where it is used to determine how a given event is rendered for other users within the organization.

1
votes

I found the legacy extended property filter method. This worked for me:

/me/contacts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq 'Integer 0x0036' and cast(ep/value, Edm.Int32) eq 2)

Used this resource. The bottom of that page also demonstrates the cast to integer. The value 0x0036 is for PR_SENSITIVITY per here. The value 2 is 'Private' per here.