-2

I have been trying to play around with the Microsoft Graph API. I have a situation here. I have assigned some meeting rooms with an email ID and want to know the availability of all. If the rooms are available currently , I should get the name of the meeting room and if possible , the duration for which the room is available. I want to know how to query multiple rooms and return the data.

A bit confused about the following APIs, would these help ?

https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/user_findmeetingtimes

GET https://graph.microsoft.com/beta/me/calendar
Apoorv
  • 2,023
  • 1
  • 19
  • 42

1 Answers1

3

I have assigned some meeting rooms with an email ID and want to know the availability of all.

The findMeetingTimes API should suit your scenario. For the assigned meeting rooms, you can list them inside locationConstraint parameter of request body, for the assigned attendee email ID, you can add it to attendees parameter of request body. Then the response of this API will return a list of meeting time suggestions based on the meeting rooms are available and all attendees are available. And the the names of rooms available are listed on "locations" of every suggestion.

You can test this API with the example inside the document. My testing result:

enter image description here

Update:

Pay attention that check the permissions inside the document for using this API. Firstly, the account should be work or school account, personal Microsoft account is not supported. Secondly,you need to have Calendars.Read.Shared, Calendars.ReadWrite.Shared permissions.

Sunteen Wu
  • 10,509
  • 1
  • 10
  • 21
  • Wu :Would you be able to help me out with a code snippet? I am not in an organizational setup and using personal email IDs to login – Apoorv Sep 12 '17 at 19:56
  • I tried to use Microsoft Graph Explorer to test it but I got this error :Failure - Status Code 403692msLooks like you may not have the permissions for this call. Please modify your permissions. I have selected all the permissions except the ones related to Admins but still no success – Apoorv Sep 12 '17 at 20:03
  • @Apoorv, For this exception is because you didn't have permissions. Personal account is not supported.Details please check my updated answer. – Sunteen Wu Sep 13 '17 at 01:44
  • I have one more issue.I tried creating an Office 365 organizational setup and used Azure AD for configuring my Tenent but The error while login I got was API version not supported. How can I use graph API for my dummy organization that I setup using office 365. – Apoorv Sep 13 '17 at 03:40
  • @Apoorv, could you please try beta version? For example, `https://graph.microsoft.com/beta/me/findMeetingTimes`. And, if you still have new issues, please open a new thread (since this comment has no relationship with your above issue). – Sunteen Wu Sep 14 '17 at 07:15
  • Wu -MSFT : would you be in a position to explain what does the parameter "resolveAvailability" does ? – Apoorv Sep 26 '17 at 12:31