I am trying to create an Event through Microsoft Graph API but getting datetime and timezone issue
What I am sending in the body.
"start": {
"dateTime": "2020-08-25T09:52:00",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2020-08-25T09:58:00",
"timeZone": "India Standard Time"
}
What I am getting in the response
"start": {
"dateTime": "2020-09-01T09:52:00.0000000",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2020-09-01T09:58:00.0000000",
"timeZone": "India Standard Time"
}
Please suggest.
Thanks in advance.
I resolved it by sending payload like below
url: 'https://graph.microsoft.com/v1.0/me/events',
headers: {
Authorization: 'Bearer ' + token,
'Content-Type': 'application/json',
'SdkVersion': 'postman-graph/v1.0',
'outlook.timezone': 'Asia/Kolkata'
},
body: {
subject: json.w_title,
allowNewTimeProposals: true,
isOnlineMeeting: true,
onlineMeetingProvider: "teamsForBusiness",
body: {
"contentType": "HTML",
"content": "Online Webinar"
},
start: {
"dateTime": "2020-08-25T09:52:00",
"timeZone": "Asia/Kolkata"
},
end: {
"dateTime": "2020-08-25T09:58:00",
"timeZone": "Asia/Kolkata"
},
location: {
"displayName": "Bokaro Jharkhand"
}
}
Related
I'm facing a problem with https://learn.microsoft.com/en-us/graph/api/user-findmeetingtimes?view=graph-rest-1.0&tabs=http
I'm trying to find an available time slot between my attendees, me and the meeting room.
{
"attendees": [
{
"emailAddress": {
"address": "madreww#mycompany.com"
},
"type": "Required"
}
],
"timeConstraint": {
"timeslots": [
{
"start": {
"dateTime": "2023-01-11T12:00:00.000Z",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2023-01-11T15:00:00.000Z",
"timeZone": "Pacific Standard Time"
}
}
]
},
"locationConstraint": {
"isRequired": "true",
"suggestLocation": "false",
"locations": [
{
"locationEmailAddress": "room-accueil#mycompany.com"
}
]
},
"meetingDuration": "PT1H"
}
But the problem if the room "room-accueil#mycompany.com" is booked from 12AM TO 1PM and the response display this available time slot without taking in account the booked room.
Do you have a idea why? And how I can check with this method, if attendees, organizer and the meeting room are all available in a meeting slot time?
Response:
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.meetingTimeSuggestionsResult",
"emptySuggestionsReason": "",
"meetingTimeSuggestions": [
{
"confidence": 100,
"organizerAvailability": "free",
"attendeeAvailability": [
{
"availability": "free",
"attendee": {
"emailAddress": {
"address": "madreww#mycompany.com"
}
}
}
],
"locations": [
{
"locationEmailAddress": "room-accueil#mycompany.com",
"locationType": "conferenceRoom"
}
],
"meetingTimeSlot": {
"start": {
"dateTime": "2023-01-11T12:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2023-01-11T13:00:00.0000000",
"timeZone": "UTC"
}
}
},
{
"confidence": 100,
"organizerAvailability": "free",
"attendeeAvailability": [
{
"availability": "tentative",
"attendee": {
"emailAddress": {
"address": "madreww#mycompany.com"
}
}
}
],
"locations": [
{
"locationEmailAddress": "room-accueil#mycompany.com",
"locationType": "conferenceRoom"
}
],
"meetingTimeSlot": {
"start": {
"dateTime": "2023-01-11T13:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2023-01-11T14:00:00.0000000",
"timeZone": "UTC"
}
}
},
{
"confidence": 100,
"organizerAvailability": "free",
"attendeeAvailability": [
{
"availability": "free",
"attendee": {
"emailAddress": {
"address": "madreww#mycompany.com"
}
}
}
],
"locations": [
{
"locationEmailAddress": "room-accueil#mycompany.com",
"locationType": "conferenceRoom"
}
],
"meetingTimeSlot": {
"start": {
"dateTime": "2023-01-11T14:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2023-01-11T15:00:00.0000000",
"timeZone": "UTC"
}
}
}
]
}
But If I use the room in attendees, the room seems to be always booked and always busy
Microsoft Graph API Find meeting times the 1st attendee availability status showing free but for second attendee status showing unknown how to show the availability status as free if both attendees are free?
note: while passing two attendees in the request then only 2nd attendee getting availability unknown.
Here Iam passing 2 attendees
Request Body:
"attendees": [
{
"type": "required",
"emailaddress": {
"name": "shanavaz",
"address": "shan#2vgl33.onmicrosoft.com"
}
},
{
"type": "required",
"emailaddress": {
"name": "Akhila",
"address": "ak#2vgl33.onmicrosoft.com"
}
}
],
"locationConstraint": {
"isRequired": false,
"suggestLocation": false,
"locations": []
},
"timeConstraint": {
"activityDomain": "work",
"timeSlots": [
{
"start": {
"dateTime": "2022-10-13T00:00:00.000Z",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2022-10-13T23:59:00.000Z",
"timeZone": "India Standard Time"
}
}
]
},
"isOrganizerOptional": "true",
"meetingDuration": "PT30M",
"returnSuggestionReasons": "true",
"minimumAttendeePercentage": "50",
"maxCandidates": 36
}
**Response:**
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.meetingTimeSuggestionsResult",
"emptySuggestionsReason": "",
"meetingTimeSuggestions": [
{
"confidence": 74.5,
"organizerAvailability": "busy",
"suggestionReason": "Suggested because even when you are busy most attendees are available.",
"attendeeAvailability": [
{
"availability": "free",
"attendee": {
"emailAddress": {
"address": "shan#2vgl33.onmicrosoft.com"
}
}
},
{
"availability": "unknown",
"attendee": {
"emailAddress": {
"address": "ak#2vgl33.onmicrosoft.com"
}
}
}
],
"locations": [],
"meetingTimeSlot": {
"start": {
"dateTime": "2022-10-13T05:30:00.0000000",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2022-10-13T06:00:00.0000000",
"timeZone": "India Standard Time"
}
}
},
{
"confidence": 74.5,
"organizerAvailability": "busy",
"suggestionReason": "Suggested because even when you are busy most attendees are available.",
"attendeeAvailability": [
{
"availability": "free",
"attendee": {
"emailAddress": {
"address": "shan#2vgl33.onmicrosoft.com"
}
}
},
{
"availability": "unknown",
"attendee": {
"emailAddress": {
"address": "ak#2vgl33.onmicrosoft.com"
}
}
}
],
"locations": [],
"meetingTimeSlot": {
"start": {
"dateTime": "2022-10-13T06:30:00.0000000",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2022-10-13T07:00:00.0000000",
"timeZone": "India Standard Time"
}
}
}
]
}```
When I get a Message or Event object, I don't see any property that seems to be related to AllowForward. Tried both v1.0 and beta.
There is no strongly typed property so you need to use the Extended property for this eg to send a Meeting with no forward
{
"subject": "My event",
"start": {
"dateTime": "2020-10-13T04:55:36.463Z",
"timeZone": "UTC"
},
"end": {
"dateTime": "2020-10-20T04:55:36.463Z",
"timeZone": "UTC"
},
"attendees": [
{
"emailAddress": {
"address":"blah#domain.com",
"name": "gs"
},
"type": "required"
}
],
"SingleValueExtendedProperties": [
{
"PropertyId": "Boolean {00020329-0000-0000-C000-000000000046} Name DoNotForward",
"Value": "true"
}
]
}
Then to retrieve that property with an event use
https://graph.microsoft.com/v1.0/me/events?$expand=SingleValueExtendedProperties($filter%20%3D%20(id%20eq%20'Boolean%20%7B00020329-0000-0000-C000-000000000046%7D%20Name%20DoNotForward'))
Microsoft Graph API
Findmeeting times api
what happens when meeting time is less than 30mins(like 10mins)?Because Findmeeting Times search only for every 30 mins. It does not search times in between. For example I want for 10 mins meeting with someone 8 to 10. It returns 8.00 t0 8.10 and 8.30 to 8.40.Why can't it return 8.10 t0 8.20 and 8.20 to 8.30 ?Here is the inputs and outputs
Input
{
"attendees": [
{
"type": "required",
"emailAddress": {
"address": "kumar.muthu#mic123.com",
"name": "kumar muthu"
},
}
],
"timeConstraint": {
"activityDomain": "unrestricted",
"timeslots": [
{
"start": {
"dateTime": "2018-03-27T18:00:00",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2018-03-27T18:30:00",
"timeZone": "India Standard Time"
}
}
]
},
"meetingDuration": "PT0H10M"
}
Output
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.meetingTimeSuggestionsResult",
"emptySuggestionsReason": "",
"meetingTimeSuggestions": [
{
"confidence": 100,
"organizerAvailability": "free",
"meetingTimeSlot": {
"start": {
"dateTime": "2018-03-27T18:00:00.0000000",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2018-03-27T18:10:00.0000000",
"timeZone": "India Standard Time"
}
},
"attendeeAvailability": [
{
"availability": "free",
"attendee": {
"type": "required",
"emailAddress": {
"address": "kumar.muthu#mic123.com"
}
}
}
],
"locations": [
{
"displayName": "RM-CHN-Training-Room1",
"locationEmailAddress": "RM-Chennai.Trainning-Room1#mic123.com"
},
{
"displayName": "DEV BAY",
"locationEmailAddress": ""
},
{
"displayName": "Conference room near Security",
"locationEmailAddress": ""
},
{
"displayName": "Any Phone Booth or WebEx",
"locationEmailAddress": ""
},
{
"displayName": "Austin",
"locationEmailAddress": ""
}
]
}
]
}
why it doesn't send timings between 8.10 to 8.30
I can't tell you why the limitation is there. It's not documented in the Find meeting times API documentation. But Outlook, which presumably uses the same or a similar API, has the limitation in the UI as well:
I can see that your filter for 10minutes worked, now the results appear limited due to some default filters applied, try adding these params and play with the results.
"isOrganizerOptional": "true",
"returnSuggestionReasons": "true",
"minimumAttendeePercentage": "100"
Hope it helped.
I pretty confuse about meetingTimeSlot attribute which returns from meetingTimeSuggestions
My activityDomain set to "work" but my response code after I post to the API is
{ start:
{ dateTime: '2017-08-17T23:00:00.0000000',
timeZone: 'SE Asia Standard Time' },
end:
{ dateTime: '2017-08-18T01:00:00.0000000',
timeZone: 'SE Asia Standard Time' } }
time length should around 8.00 am - 5.00 pm isn't it?
Here is my full code
{
"attendees": [{
"type": "required", // First Attendee
"emailAddress": {
"name": "Pathompong Chaisri",
"address": "T00400#g-able.com"
}
}, {
"type": "required", // Third Attendee
"emailAddress": {
"name": "Artima C",
"address": "Artima.C#g-able.com"
}
}],
"locationConstraint": {
"isRequired": "false",
"suggestLocation": "false",
"locations": [{
"resolveAvailability": "false",
"displayName": "KX Building Floor 13"
}]
},
"timeConstraint": {
"activityDomain": "work",
"timeslots": [{
"start": {
"dateTime": "2017-08-17T09:00:00",
"timeZone": "SE Asia Standard Time"
},
"end": {
"dateTime": "2017-08-19T17:00:00",
"timeZone": "SE Asia Standard Time"
}
}]
},
"meetingDuration": "PT2H",
"returnSuggestionReasons": "true",
"minimumAttendeePercentage": "100"
}
Isn't that because your timeslot starts 17-08-2017 and ends two days later? I think you should provide separate 9-5 slots for each day.