Read resource mailbox information

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

July 31st, 2015 6:07am

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

Free Windows Admin Tool Kit Click here and download it now
August 2nd, 2015 10:46pm

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 18 hours 19 minutes ago
August 3rd, 2015 2:45am

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

Bjrn


Free Windows Admin Tool Kit Click here and download it now
August 11th, 2015 9:14am

>> 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

August 12th, 2015 1:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics