I'm having a bit of a problem. I am working on a small outlook plugin(in c#) with the following functions(very simplified):
Get all of the users from Exchange Server with their Timezone and add that info to the mailbody.
Getting all of the users isn't much of a problem but I have no idea about getting their Timezone.
outlook and exchange server sersion - 2010
Is there a way to achieve this? Please advise.
User's TZ and workdays are stored as a hidden message in the Calendar folder - you can see the data in OutlookSpy - go to the Calendar folder, click IMAPIFolder button, go to the "Associated Contents" tab, double click on the row with
PR_MESSAGE_CLASS == "IPM.Configuration.WorkHours"
, look at thePR_ROAMING_XMLSTREAM
stream property in the IMessage window (click on the "..." button next to the Value edit box).I don't think you'd be able to retrieve hidden item from a shared folder belonging to a different user using the Outlook Object Model. You can try to use Extended MAPI (C++ or Delphi) or EWS. If using Redemption is an option, it explicitly exposes RDOExchangeMailbox.CalendarOptions property.
You can try using getuseravailability which if it works would be the most effiencent way for a lot of users see TimeZone and Working Hours for Users through EWS . Or try something like this http://gsexdev.blogspot.com.au/2015/11/finding-timezone-being-used-in-mailbox.html