Exchange Web Services notification events can sometimes return an UnreadCount of -1
Original KB number: 4490422
Symptoms
EWS push notifications sometimes return a value of -1 for UnreadCount
.
Status
Microsoft is currently investigating this issue.
Workaround
To work around this limitation, use a GetFolder request and include PR_UNREAD_COUNT in the requested set of properties.
To include the PR_UNREAD_COUNT
property, set the property tag to PropertyTag="0x3603"
and the property type to PropertyType="Integer"
.
<ExtendedFieldURI PropertyTag="0x3603" PropertyType=" Integer"/>
If you're using the EWS Managed API or EWS Java API, use the ExtendedPropertyDefinition class to request the PR_UNREAD_COUNT
property.
More information
For more information on properties and extended properties in EWS, see Properties and extended properties in EWS in Exchange.