1

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.

yuvalm2
  • 866
  • 2
  • 10
  • 27
Greenmachine
  • 292
  • 1
  • 15
  • The user can set that via OWA, you can read that via powershell. BUT if they use Outlook its a local OS value which you need to collect from there. So not sure what you expect go get here from the Exchange server. – BastianW Jan 19 '17 at 22:40
  • Hello, thank you for your reply. I'm not sure I've I made my question clear. I need my OWA plugin to get the server's users timezone. I know this achievable via powershell, but is there anyway to do this from an outlook client? – Greenmachine Jan 20 '17 at 00:35
  • i.e. userOne - ETS UserTwo - PTS etc. – Greenmachine Jan 20 '17 at 00:41

2 Answers2

2

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

Community
  • 1
  • 1
Glen Scales
  • 20,495
  • 1
  • 20
  • 23
1

User's TZ and workdays are stored as a hidden message in the Calendar folder - you can see the data in OutlookSpy (I am its author) - 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 (I am also its author) is an option, it explicitly exposes RDOExchangeMailbox.CalendarOptions property.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78