findMeetingTimes time constraint not properly respected

Barone, Lou 56 Reputation points
2022-08-28T15:00:49.177+00:00

Below is the json I am sending to the findmeetingtimes endpoint, obviously in my real json the name\address of the person is valid I stripped them out for example sake. Otherwise the Json is identical.

What I am getting back from the API is seen in the image below. What I am trying to accomplish here is to tell the api to only start looking in the afternoon, I wouldnt expect\want it to return slots in the morning hours.

My ultimate end goal is that I only want it to search in the "Afternoon" 12-5pm when I tell it to and I cant seem to get that working.

235546-image.png

{   
  "attendees": [   
    {   
    "type": "required",    
    "emailAddress": {   
    "name": "******@domain.com",  
    "address": "******@domain.com"   
    }   
}  
  ],    
  "locationConstraint": {   
    "isRequired": false,    
    "suggestLocation": false,    
    "locations": [   
      {   
        "resolveAvailability": false,  
        "displayName": "Teams Meeting"   
      }   
    ]   
  },    
  "timeConstraint": {  
    "activityDomain":"work",   
    "timeSlots": [   
      {   
        "start": {   
          "dateTime": "2022-08-29T12:00:00",    
          "timeZone": "Eastern Standard Time"   
        },    
        "end": {   
          "dateTime": "2022-09-28T17:00:00",    
          "timeZone": "Eastern Standard Time"   
        }   
      }   
    ]   
  },    
  "isOrganizerOptional": "true",  
  "meetingDuration": "PT1H",  
  "returnSuggestionReasons": "true",  
  "minimumAttendeePercentage": "100"  
}  
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. HarmeetSingh7172 4,826 Reputation points
    2022-08-31T13:30:17.987+00:00

    Hi @Barone, Lou

    Per my understanding, FindMeetingTimes Graph API works as per design. This API will return all the available slots between the two dates. Start dateTime and End dateTime is applied as a range for the complete duration and not for a single day (in your case, it will not consider just 5 hours).

    However, you can always check suggestionReason property in API response to know the reason for suggesting the meeting time.

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

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Barone, Lou 56 Reputation points
    2022-08-28T15:31:13.553+00:00

    I was able to improve the result somewhat here, by changing the time dates to a shorter format. So now I am actually getting response in the afternoon on the first day specified. However, when given a range the API will return results in the earlier part of the AM. I suppose this is expected because technically a 9 am meeting falls within the below date range.

    So my question perhaps morphs now into, is there anyway outside of manually parsing through the events, to tell it to only return afternoon meeting slots across a range of dates?

    {
    "attendees": [
    {
    "type": "required",
    "emailAddress": {
    "name": "email@keyman .com",
    "address": "email@keyman .com"
    }
    }
    ],
    "locationConstraint": {
    "isRequired": false,
    "suggestLocation": false,
    "locations": [
    {
    "resolveAvailability": false,
    "displayName": "Teams Meeting"
    }
    ]
    },
    "timeConstraint": {
    "activityDomain":"work",
    "timeSlots": [
    {
    "start": {
    "dateTime": "2022-08-29T12:00",
    "timeZone": "Eastern Standard Time"
    },
    "end": {
    "dateTime": "2022-09-28T17:00",
    "timeZone": "Eastern Standard Time"
    }
    }
    ]
    },
    "isOrganizerOptional": "true",
    "meetingDuration": "PT1H",
    "returnSuggestionReasons": "true",
    "minimumAttendeePercentage": "100",
    "MaxCandidates":"5"
    }

    235389-image.png

    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.