Exchange WebServices IsFromMe property always returning false

Hi,

I'm using Exchange WebService API 2.0 against Exchange 2013 CU9 and trying to check if retrieved item is sent by currently authenticated user.

MSDN resource https://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.item.isfromme%28v=exchg.80%29.aspx showing that Item class contains "IsFromMe" property which describe if item is sent by binded user. It is type of "bool".

Binding to the "Sent Items" folder and retrieving items  should show "IsFromMe" as "true", however in my case all messages returning "false" for that property (fragment from one message):

From     : User 01 <EX:/o=POC/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=user4a411113>
IsFromMe : False
Sender   : User 01 <EX:/o=POC/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=user4a411113>

It is clear that "From" and "Sender" are the same user (as it should be since item is pulled from Sent Items), but "IsFromMe" states false.

Tried to load all property set, bind directly to the item, using impersonation, authenticating directly with user's credentials, etc..., but anything I tried always returning "false" at "IsFromMe".

Tried on Exchange 2010 also, same behavior.


  • Edited by F_Ivan Saturday, July 25, 2015 6:06 PM Wrong statement
July 25th, 2015 5:25pm

IsFromMe is Message Flag so it is just propagated from the PidTagMessageFlags property https://msdn.microsoft.com/en-us/library/office/cc839733.aspx . So the behaviour your describing is to be expected as per "When the message is given to a transport provider for delivery, the transport provider sets the MSGFLAG_FROMME flag if the sender had the same account on the messaging server as the message was received on. Transport providers set MSGFLAG_FROMME for an incoming message that was sent by the currently logged on user. A client can use this value to determine that it is more appropriate to show recipient names in the contents table of the Sent Items folder than sender names. Messages that have been saved during the composition process and not yet sent should also be displayed with recipient names rather than sender names."

My suggestion is that you use the Sender Address to check if the sender was the local mailboxes in this instance.

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
July 26th, 2015 11:53pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics