locked
How to retrieve the BookInPolicy for a room mailbox RRS feed

  • Question

  • 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


    Tuesday, August 11, 2015 11:28 PM

All replies

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

    Wednesday, August 12, 2015 5:21 AM
  • 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

    Thursday, August 20, 2015 9:48 PM
  • 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

    Friday, August 21, 2015 4:14 AM