How to retrieve the BookInPolicy for a room mailbox

Hi,

So basically, I am trying to check if a given user has permission to a book a restricted room in my org.

ExchangeService exchange = setupExchange(); // This setups exchange with the right credentials. This part is working as I have used the same setup function retrieve availabilities of a room and an user.

Mailbox meetingMailbox = new Mailbox("xyxz@amazon.com");
FolderId folderId = new FolderId(WellKnownFolderName.Calendar, meetingMailbox);
UserConfiguration userConfiguration = UserConfiguration.bind(exchange,
                                                                                           "Calendar",
                                                                                            folderId,
                                                                                            UserConfigurationProperties.All);

So when I run this part of code, it blows up on UserConfiguration bind method. I am trying to access the BookInPolicy eventually.


Could some one tell me how do I achieve this?

-Hrushikesh


August 11th, 2015 7:29pm

>> So when I run this part of code, it blows up on UserConfiguration bind method. I am trying to access the BookInPolicy eventually.

If you get an error you need to post what the error you get is

What version of Exchange are you trying to run the code against ? (this would only work on Exchange 2010 or greater)

What rights does the user have to the Folder your trying to access ? (if a user doesn't have access to book a calendar then generally that also aren't going to have rights to the Calendar Folder where your trying to access the FAI Item).

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
August 12th, 2015 1:23am

Hi,

So I was able to talk to exchange EWSJavaApi successfully and retrieve a list of GUIDs who have access to book the restricted room in Exchange. I was able to retrieved this list via the BookInPolicy key on the meeting mailbox (aka the room). The GUIDs could represent an user or a group. 

Now my question is how do I check if an user is in this list of GUIDs. How do I get more information regarding these GUIDs. One way I see is talking to Active Directory and retrieving all the detials about these GUIDs. Is there an easier why the check if the user is present in this list or will I have to loop through this entire list. Looping through the entire list will require talking to AD with each GUID.

Thank you

-Hrushikesh

August 20th, 2015 5:49pm

Can you post an example of the GUID you get ? As far as I know you should get the ExchangeLegacyDN of the Mailbox or Group in the BookInPolicy which you can then use ResolveName operation https://msdn.microsoft.com/en-us/library/office/dn645423(v=exchg.150).aspx to get more information on. However I would just LDAP and look up Active Directory yourself which is more flexible.

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
August 21st, 2015 12:15am

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

Other recent topics Other recent topics