Reputation: 621
Find Meeting Times In Microsoft graph API have parameter name attendees
if we have 1 attendees my code gonna look like this
{
"attendees": [
{
"type": "required",
"emailAddress": {
"name": "Fanny Downs",
"address": "[email protected]"
}
}
],
"locationConstraint": {
"isRequired": "false",
"suggestLocation": "false",
"locations": [
{
"resolveAvailability": "false",
"displayName": "Conf room Hood"
}
]
},
"timeConstraint": {
"activityDomain":"unrestricted",
"timeslots": [
{
"start": {
"dateTime": "2017-04-17T09:00:00",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2017-04-19T17:00:00",
"timeZone": "Pacific Standard Time"
}
}
]
},
"meetingDuration": "PT2H",
"returnSuggestionReasons": "true",
"minimumAttendeePercentage": "100"
}
and i try to add more attendees by change code to this
"attendees": [
{
"type": "required",
"emailAddress": {
"name": "Fanny Downs",
"address": "[email protected]"
} ,
"emailAddress": {
"name": "Joey medapple",
"address": "[email protected]"
}
}
]
but it's not working
how could i add other attendees
Upvotes: 1
Views: 749
Reputation: 33094
You're placing the 2nd person at the wrong level. Each "attendee" should look contain both type
and emailAddress
:
"attendees": [{
"type": "required", // First Attendee
"emailAddress": {
"name": "Fanny Downs",
"address": "[email protected]"
}
}, {
"type": "required", // Second Attendee
"emailAddress": {
"name": "Jonny Doe",
"address": "[email protected]"
}
}, {
"type": "optional", // Third Attendee
"emailAddress": {
"name": "Dave Smith",
"address": "[email protected]"
}
}],
So you're complete request should look something like this:
{
"attendees": [{
"type": "required", // First Attendee
"emailAddress": {
"name": "Fanny Downs",
"address": "[email protected]"
}
}, {
"type": "required", // Second Attendee
"emailAddress": {
"name": "Jonny Doe",
"address": "[email protected]"
}
}, {
"type": "optional", // Third Attendee
"emailAddress": {
"name": "Dave Smith",
"address": "[email protected]"
}
}],
"locationConstraint": {
"isRequired": "false",
"suggestLocation": "false",
"locations": [{
"resolveAvailability": "false",
"displayName": "Conf room Hood"
}]
},
"timeConstraint": {
"activityDomain": "unrestricted",
"timeslots": [{
"start": {
"dateTime": "2017-04-17T09:00:00",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2017-04-19T17:00:00",
"timeZone": "Pacific Standard Time"
}
}]
},
"meetingDuration": "PT2H",
"returnSuggestionReasons": "true",
"minimumAttendeePercentage": "100"
}
Upvotes: 2