Getting Exchange Server's users timezone

2019-03-03 06:41发布

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.

2条回答
The star\"
2楼-- · 2019-03-03 07:18

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 the PR_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.

查看更多
劳资没心,怎么记你
3楼-- · 2019-03-03 07:25

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

查看更多
登录 后发表回答