API to retrieve work hour start time and end time RRS feed

  • Question

  • Hi,

    I am looking for an API to retrieve working hours of a person from the exchange server. Let me know, if you have any specific API call to retrieve this.


    Tuesday, October 15, 2013 10:45 PM

All replies

  • What version of Exchange are you using ? on Exchange 2010,2013 you can use EWS via the UserConfiguration operation eg


                UserConfiguration WorkHours;
                WorkHours = UserConfiguration.Bind(service, "WorkHours", WellKnownFolderName.Calendar, UserConfigurationProperties.All);
                XmlDocument xmlConfig = new XmlDocument();
                XmlNodeList xmlList = xmlConfig.GetElementsByTagName("TimeSlot");
                if (xmlList.Count > 0) {
                    for (Int32 ncCnt = 0; xmlList[0].ChildNodes.Count > ncCnt;ncCnt++ )
                        XmlNode ChildNode = xmlList[0].ChildNodes[ncCnt];
                        if (ChildNode.Name == "Start")
                        if (ChildNode.Name == "End")
                XmlNodeList xmlList1 = xmlConfig.GetElementsByTagName("TimeZone");
                if (xmlList1.Count > 0)
                    for (Int32 ncCnt = 0; xmlList1[0].ChildNodes.Count > ncCnt; ncCnt++)
                        XmlNode ChildNode = xmlList1[0].ChildNodes[ncCnt];
                        if (ChildNode.Name == "Name") {

    The format of the XMLdocument is documented in


    Wednesday, October 16, 2013 5:35 AM
  • Hi Glen,

    Thanks for your reply. As I am looking for a whole organizations working time, Is it possible to track all the resources working time through external api's or any other.


    Wednesday, October 16, 2013 5:25 PM
  • Hello Gokulramkumar,

    if using PowerShell is a valid option for you, using the Get-MailboxCalendarConfiguration Cmdlet ought to do the trick for you. Since I usually start things from the PowerShell side and add other Apis / languages to it, I have no experience launching PowerShell commandlets from C#, so I can't help you with that, but I think I've heard there's a fairly simple way to do that. The search function ought to go a long way for that.


    Ps.: Please note, that you need the Exchange Management Shell to run Exchange Cmdlets (It can be installed using the Exchange Server Installer, ought to be already available on all Exchange 2010+ Servers and can be installed on any current Server or Client Windows OS). That's a PSSnapin, not a module, which may cause it to act odd outside PowerShell. You only see Cmdlets you have the permissions to use. This means, trying to run the command without permissions will not throw a "Permission Denied" Error, but an "Unknown Command" Error, as it never has been loaded in the first place.

    There's no place like

    Wednesday, October 16, 2013 8:37 PM