none
Read resource mailbox information RRS feed

  • Question

  • Hi

    Is there a way to read properties of resource (room) mailboxes programmatically (preferably via EWS)

    The information I'm particularly interested in 

    • weather the meeting requests is handled by delegates or automatically
    •  the user / group restriction for a room

    Background: I'm writing an application that does room bookings on behalf of users in a synchronous fashion. The application itself uses a service account (impersonation) but the bookings needs to be compliant with the users permission. Since I need a verification in real time the only solution I see is to bypass Exchanges booking mechanism and inject the meeting directly in the rooms calendar. I wish there is a better solution. If there is let me know.

    Best
    fischerman

    Friday, July 31, 2015 10:05 AM

Answers

  • You should be able to get most of it from the UserConfiguration object in the Calendar of the Mailbox with EWS eg

                FolderId CalendarFolderId = new FolderId(WellKnownFolderName.Calendar,"room@dom.com");
                UserConfiguration uc = UserConfiguration.Bind(service, "Calendar", CalendarFolderId, UserConfigurationProperties.All);
                Object ForwardRequestsToDelegatesVal = null;
                if (uc.Dictionary.TryGetValue("ForwardRequestsToDelegates",out ForwardRequestsToDelegatesVal))
                {
                    Console.WriteLine((bool)ForwardRequestsToDelegatesVal);
                }
                Object AutomateProcessingVal = null;
                if (uc.Dictionary.TryGetValue("AutomateProcessing", out AutomateProcessingVal))
                {
                    Console.WriteLine((int)AutomateProcessingVal);
                }
                Object AllBookInPolicy = null;
                if (uc.Dictionary.TryGetValue("AllBookInPolicy", out AllBookInPolicy))
                {
                    Console.WriteLine((bool)AllBookInPolicy);
                }
                Object BookInPolicyLegDNVal = null;
                if (uc.Dictionary.TryGetValue("BookInPolicyLegDN", out BookInPolicyLegDNVal))
                {
                    foreach (String UserDn in (String[])BookInPolicyLegDNVal)
                    {
                        Console.WriteLine(UserDn);
                    }
                }
                Object AllRequestInPolicyVal = null;
                if (uc.Dictionary.TryGetValue("AllRequestInPolicy", out AllRequestInPolicyVal))
                {
                    Console.WriteLine((bool)AllRequestInPolicyVal);
                } 

    Otherwise you could just use the Exchange Management Shell and the get-calendarProcessing cmdel via https://msdn.microsoft.com/en-us/library/office/ff326159(v=exchg.150).aspx

    Cheers
    Glen

    • Marked as answer by thegothss Tuesday, August 11, 2015 1:05 PM
    Monday, August 3, 2015 2:45 AM

All replies

  • You should be able to get most of it from the UserConfiguration object in the Calendar of the Mailbox with EWS eg

                FolderId CalendarFolderId = new FolderId(WellKnownFolderName.Calendar,"room@dom.com");
                UserConfiguration uc = UserConfiguration.Bind(service, "Calendar", CalendarFolderId, UserConfigurationProperties.All);
                Object ForwardRequestsToDelegatesVal = null;
                if (uc.Dictionary.TryGetValue("ForwardRequestsToDelegates",out ForwardRequestsToDelegatesVal))
                {
                    Console.WriteLine((bool)ForwardRequestsToDelegatesVal);
                }
                Object AutomateProcessingVal = null;
                if (uc.Dictionary.TryGetValue("AutomateProcessing", out AutomateProcessingVal))
                {
                    Console.WriteLine((int)AutomateProcessingVal);
                }
                Object AllBookInPolicy = null;
                if (uc.Dictionary.TryGetValue("AllBookInPolicy", out AllBookInPolicy))
                {
                    Console.WriteLine((bool)AllBookInPolicy);
                }
                Object BookInPolicyLegDNVal = null;
                if (uc.Dictionary.TryGetValue("BookInPolicyLegDN", out BookInPolicyLegDNVal))
                {
                    foreach (String UserDn in (String[])BookInPolicyLegDNVal)
                    {
                        Console.WriteLine(UserDn);
                    }
                }
                Object AllRequestInPolicyVal = null;
                if (uc.Dictionary.TryGetValue("AllRequestInPolicy", out AllRequestInPolicyVal))
                {
                    Console.WriteLine((bool)AllRequestInPolicyVal);
                } 

    Otherwise you could just use the Exchange Management Shell and the get-calendarProcessing cmdel via https://msdn.microsoft.com/en-us/library/office/ff326159(v=exchg.150).aspx

    Cheers
    Glen

    • Marked as answer by thegothss Tuesday, August 11, 2015 1:05 PM
    Monday, August 3, 2015 2:45 AM
  • Thank you, Glen

    This is exactly what I'm looking for.

    Is there any document on how this UserConfiguration relates to exchange or what UserConfigurations are provided by Exchange itself? Moreover is it still available in further versions?

    Cheers

    Björn


    Tuesday, August 11, 2015 1:10 PM
  • >> Moreover is it still available in further versions?

    Yes

    >>Is there any document on how this UserConfiguration relates to exchange or what UserConfigurations are provided by Exchange itself?

    Probably this is the best documentation on the  https://msdn.microsoft.com/en-us/library/cc463899(v=exchg.80).aspx . Generally these are used to store private configuration information for different components so because of this they aren't documented and generally modifying/accessing wouldn't be officially supported because of the fact they maybe changed at any point in the future.

    Cheers
    Glen

    Wednesday, August 12, 2015 5:28 AM