none
Current users WorkHours/Timezone and meeting attendee availability with Timezone information RRS feed

  • Question

  • Hi,

    Using EWS it is possible to get UserConfiguration for WorkHours. This provides details of the logged on user's WorkHours including (ref: https://msdn.microsoft.com/en-us/library/office/gg274398(v=exchg.80).aspx):

    • Timezone
    • work start and end times
    • work day's

    It is also possible to get detailed user availability through EWS (for users on the same Exchange server if authorised) including the users configured timezone (ref: https://msdn.microsoft.com/en-us/library/office/aa564001(v=exchg.140).aspx).

    Is this possible through an Outlook VSTO add-in please?

    Sorry if this is a simple question, I'm banging my head against a brick wall... All I've found is the details provided in the ExchangeUser object and the FreeBusy time.

    Thank you,

    Paul

    Thursday, February 2, 2017 1:13 AM

Answers

  • 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).

    You should be able to access that hidden message from a VSTO addin using the Outlook Object Model - use MAPIFolder.GetStorage to open that hidden message in the Calendar folder (returned from Namespace.GetDefaultFolder).


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by Paul Taggart Thursday, February 2, 2017 5:39 AM
    Thursday, February 2, 2017 3:42 AM
  • For the f/b data (which is dynamic unlike the work hours), use Recipeint.FreeeBusy or AddressEntry.GetFReeBusy.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by Paul Taggart Thursday, February 2, 2017 9:03 PM
    Thursday, February 2, 2017 3:39 PM

All replies

  • 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).

    You should be able to access that hidden message from a VSTO addin using the Outlook Object Model - use MAPIFolder.GetStorage to open that hidden message in the Calendar folder (returned from Namespace.GetDefaultFolder).


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by Paul Taggart Thursday, February 2, 2017 5:39 AM
    Thursday, February 2, 2017 3:42 AM
  • Thank you Dmitry! :)

    Outlook.NameSpace MAPI = Application.GetNamespace("MAPI");
    Outlook.MAPIFolder calendar = MAPI.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar);
    
    Outlook.StorageItem storage = calendar.GetStorage("IPM.Configuration.WorkHours", Outlook.OlStorageIdentifierType.olIdentifyByMessageClass);
    
    Outlook.PropertyAccessor accessor = storage.PropertyAccessor;
                    
    byte[] xml = accessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x7C080102");
    
    DebugConsole.WriteLine(String.Format("xml=[{0}]", System.Text.Encoding.UTF8.GetString(xml)));

    Thursday, February 2, 2017 5:41 AM
  • Hi Dmitry,

    One more quick question. Can you point me in the right direction for availability data for recipients including their work hours please?

    The data is available as the work hours / availability is shown on the "Scheduling Assistant".

    I've searched through using OutlookSpy (great app) and can't find the details.

    I expected it to be in "Associated Contents" tab, with message class "IPM.Configuration.AvailabilityOptions". It wasn't.

    I've also checked the details for the individual invitees on the meeting.

    Thank you,

    Paul

    Thursday, February 2, 2017 6:20 AM
  • For the f/b data (which is dynamic unlike the work hours), use Recipeint.FreeeBusy or AddressEntry.GetFReeBusy.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    • Marked as answer by Paul Taggart Thursday, February 2, 2017 9:03 PM
    Thursday, February 2, 2017 3:39 PM
  • Hi Dmitry,

    Thank you. I'm using the Recipient.FreeBusy and AddressEntry.GetFreeBusy calls. I was hoping we would be able to get the meeting attendee's WorkHours and Timezone as well as the Free/Busy time.

    We can live with just the Free/Busy information though

    Thank you for all your help :)

    Paul

    Thursday, February 2, 2017 9:03 PM