service.GetUserAvailability.WorkingHours is not returning the timezone name or id RRS feed

  • Question

  • I am trying to get multiple users' time zone and was using service.GetUserAvailability.WorkingHours to get the timezone for a user. I am getting the offset of an user's timezone, but not getting the timezone name or timezone id(actually a alphanumeric string is received for id). Please help to sort this issue to get the Timezone name
    Friday, November 14, 2014 9:41 AM

All replies

  • Hi,

    the user timezone is available in UserConfiguration object named "OWA.UserOptions" (under root folder) : read the key "timezone" which contains the windows timezone id.

     Microsoft.Exchange.WebServices.Data.UserConfiguration options = Microsoft.Exchange.WebServices.Data.UserConfiguration.Bind(service, "OWA.UserOptions", Microsoft.Exchange.WebServices.Data.WellKnownFolderName.Root, Microsoft.Exchange.WebServices.Data.UserConfigurationProperties.All);
    string tzId = (string) options.Dictionary["timezone"];


    Désiré GOVIN Refresh IT Solutions

    Friday, November 14, 2014 11:31 AM
  • My code is

     GetUserAvailabilityResults freeBusyResults = service.GetUserAvailability(attendees, new TimeWindow(meetingStartDateTime, meetingEndDateTime), AvailabilityData.FreeBusy,

    if (availability != null && availability.WorkingHours != null && availability.WorkingHours.TimeZone != null)
                       TimeZoneInfo tzi = (TimeZoneInfo)availability.WorkingHours.TimeZone;
                       listAttendee[i].TimeZone = tzi;
                       listAttendee[i].StandardNameTZ = GetStandardNameTZ(tzi);

    Friday, November 14, 2014 11:46 AM
  • Hi,

    I am getting the time zone BaseUtcOffset but daylight savings are not applying on that


    K.Saravana Deepak

    Friday, November 21, 2014 10:06 AM