Graph API calendar getschedule response time is slow when trying to get schedule of more than 20("v1.0/me/calendar/getschedule")

Maddukuri, Shyam Satya Chand 5 Reputation points
2024-02-15T15:16:36.25+00:00

Scenario :- We need to display all available room for an location selected for an certain time interval.

To achieve this we are using "v1.0/me/calendar/getschedule" by passing rooms ids/emails as schedules to get the available times of rooms . However, in some cases, it may take more than 20 seconds to get a response if there are more than 15 meeting rooms.
Please let us know if there is a better way..

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Saranya Madhu-MSFT 2,375 Reputation points Microsoft External Staff
    2024-02-15T17:44:39.29+00:00

    Hi @Maddukuri, Shyam Satya Chand,

    Thanks for reaching out!

    The v1.0/me/calendar/getschedule endpoint is used to get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period.

    If you are still experiencing slow response times, you may want to consider optimizing your query by reducing the number of rooms or the time interval being queried.

    One way to optimize is to use availabilityViewInterval parameter when querying for the availability of multiple meeting rooms. This parameter allows you to specify the time interval, in minutes, for which to return availability information. By setting this parameter to a larger value, you can reduce the number of time slots returned in the response, which can help improve the performance of the API.

    User's image

    Another approach, I would recommend you raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from New support request - Microsoft Entra admin center or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly Upvote. If you have further questions about this answer, please click "Comment".


  2. Maddukuri, Shyam Satya Chand 5 Reputation points
    2024-02-15T19:02:22.5666667+00:00

    @Saranya Madhu-MSFT
    Right now we are sending availabilityViewInterval in the query which could be 10mins to 5hours . In our scenario we looking for specific time of day .So availabilityViewInterval value would be the time duration between startTime and endTime
    Below is sample Request. JSONCopy

    {
        "Schedules": [
            
            "******@adp.com"
        ],
        "StartTime": {
            "dateTime": "2023-02-02T08:00:00",
            "timeZone": "Eastern Standard Time"
        },
        "EndTime": {
            "dateTime": "2022-02-02T09:00:00",
            "timeZone": "Eastern Standard Time"
        },
        "availabilityViewInterval": "60"
    }
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.