Findmeeting Calendar API time zone issue

Tamizhselvan S 1 Reputation point
2022-11-15T06:12:37.607+00:00

Hi , We are using MS Graph find meeting api to get attendees free meeting slots. By default the response is coming in UTC time zone. How to get the IST time slots in the response. Tried with passing timezone in header , still it is not working . Request body is below for your reference.

{
    "attendees": [
        {
            "type": "required",
            "emailAddress": {
                "name": "XYZ",
                "address": "abc@accre.com"
            }
        }
    ],
    "locationConstraint": {
        "isRequired": false,
        "suggestLocation": false,
        "locations": [
            {
                "resolveAvailability": false,
                "displayName": "Conf room Hood"
            }
        ]
    },
    "timeConstraint": {
        "activityDomain": "unrestricted",
        "timeSlots": [
            {
                "start": {
                    "dateTime": "2022-11-15T09:00:00",
                    "timeZone": "India Standard Time"
                },
                "end": {
                    "dateTime": "2022-11-15T17:00:00",
                    "timeZone": "India Standard Time"
                }
            }
        ]
    },
    "isOrganizerOptional": "false",
    "meetingDuration": "PT30M",
    "returnSuggestionReasons": "true",
    "minimumAttendeePercentage": "100",
    "maxCandidates": 98
}

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,316 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Shivam Dhiman 5,951 Reputation points
    2022-11-15T10:02:42.84+00:00

    Hi @Tamizhselvan S

    To get attendees free meeting slots you need to use header Prefer: outlook.timezone="India Standard Time". Please find the below sample screenshot along with the body.
    260504-meetingslot.png

    {  
        "attendees": [  
            {  
                "type": "required",  
                "emailAddress": {  
                    "name": "Diego Siciliani",  
                    "address": DiegoS@M****.OnMicrosoft.com  
                }  
            }  
        ],  
        "locationConstraint": {  
            "isRequired": false,  
            "suggestLocation": false,  
            "locations": [  
                {  
                    "resolveAvailability": false,  
                    "displayName": "Conf room Hood"  
                }  
            ]  
        },  
        "timeConstraint": {  
            "activityDomain": "work",  
            "timeSlots": [  
                {  
                    "start": {  
                        "dateTime": "2022-11-16T09:00:00",  
                        "timeZone": "Pacific Standard Time"  
                    },  
                    "end": {  
                        "dateTime": "2022-11-16T17:00:00",  
                        "timeZone": "Pacific Standard Time"  
                    }  
                }  
            ]  
        },  
        "isOrganizerOptional": "false",  
        "meetingDuration": "PT1H",  
        "returnSuggestionReasons": "true",  
        "minimumAttendeePercentage": "100"  
    }  
    

    Please refer to this documentation for more details.
    Hope this helps.

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

    0 comments No comments