I have a Microsoft Bookings service, my customers can book meeting on the associated booking page, which creates a Bookings Appointment (visible on the company's Microsoft Bookings UI) and a Calendar Event (visible on the staff member's Outlook Calendar).
These two objects seem to be different and accessibles differently from the Microsoft Graph API.
The first one with GET /solutions/bookingBusinesses/{id}/appointments/{id}
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#solutions/bookingBusinesses('bookingBusinessId')/appointments/$entity",
"id": "Id",
"selfServiceAppointmentId": "",
"additionalInformation": "",
"isLocationOnline": true,
"joinWebUrl": "some link",
"customerTimeZone": "",
"serviceId": "service Id",
"serviceName": "service Name",
"duration": "PT30M",
"preBuffer": "PT0S",
"postBuffer": "PT0S",
"priceType": "notSet",
"price": 0,
"serviceNotes": "Some service notes",
"optOutOfCustomerEmail": false,
"staffMemberIds": [
"someStaffMemberId"
],
"smsNotificationsEnabled": false,
"maximumAttendeesCount": 1,
"filledAttendeesCount": 1,
"startDateTime": {
"dateTime": "2022-09-26T13:30:00.0000000",
"timeZone": "UTC"
},
"endDateTime": {
"dateTime": "2022-09-26T14:00:00.0000000",
"timeZone": "UTC"
},
"serviceLocation": {
"displayName": "",
"locationEmailAddress": "",
"locationUri": "",
"locationType": "default",
"uniqueId": null,
"uniqueIdType": null,
"address": {
"street": "",
"city": "",
"state": "",
"countryOrRegion": "",
"postalCode": ""
},
"coordinates": {
"altitude": "NaN",
"latitude": "NaN",
"longitude": "NaN",
"accuracy": "NaN",
"altitudeAccuracy": "NaN"
}
},
"reminders": [],
"customers": [
{
"@odata.type": "#microsoft.graph.bookingCustomerInformation",
"customerId": "someCustomerId",
"name": "",
"emailAddress": "",
"phone": "",
"timeZone": "",
"notes": "",
"location": null,
"customQuestionAnswers": []
}
]
}
The second one with GET /users/{userid}/events/{id}
{
"@odata.etag": "some key",
"id": "id",
"createdDateTime": "2022-09-20T14:26:35.2341929Z",
"lastModifiedDateTime": "2022-09-20T14:26:38.68763Z",
"changeKey": "change Key",
"categories": [
"category Name"
],
"transactionId": null,
"originalStartTimeZone": "UTC",
"originalEndTimeZone": "UTC",
"iCalUId": "i Cal UId",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "Subject",
"bodyPreview": "********************************************************\r\n NOTE: This is a read-only view of the booking.\n Please use Microsoft Bookings for web, iOS or Android to edit this booking.\n Any changes made here will be lost.\r\n**********************************",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": false,
"seriesMasterId": null,
"showAs": "busy",
"type": "singleInstance",
"webLink": "web link",
"onlineMeetingUrl": null,
"isOnlineMeeting": true,
"onlineMeetingProvider": "teamsForBusiness",
"allowNewTimeProposals": true,
"occurrenceId": null,
"isDraft": false,
"hideAttendees": false,
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta name=\"Generator\" content=\"Microsoft Exchange Server\">\r\n<!-- converted from text -->\r\n<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style></head>\r\n<body>\r\n<font size=\"2\"><span style=\"font-size:11pt;\"><div class=\"PlainText\">********************************************************<br>\r\n NOTE: This is a read-only view of the booking.<br>\r\n Please use Microsoft Bookings for web, iOS or Android to edit this booking.<br>\r\n Any changes made here will be lost.<br>\r\n********************************************************<br>\r\n<br>\r\nCustomer Info<br>\r\n--------------------<br>\r\nName:<br>\r\nEmail:<br>\r\nTime Zone: (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna<br>\r\n<br>\r\nBooking Info<br>\r\n--------------------<br>\r\nService name:<br>\r\n<br>\r\nInternal Notes<br>\r\n-----------------------<br>\r\n<br>\r\n</div></span></font>\r\n</body>\r\n</html>\r\n"
},
"start": {
"dateTime": "2022-09-23T13:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2022-09-23T13:30:00.0000000",
"timeZone": "UTC"
},
"location": {
"displayName": "",
"locationType": "default",
"uniqueIdType": "unknown",
"address": {},
"coordinates": {}
},
"locations": [],
"recurrence": null,
"attendees": [
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "attendee Name",
"address": "attendees email"
}
}
],
"organizer": {
"emailAddress": {
"name": "organizer Name",
"address": "organizer email"
}
},
"onlineMeeting": {
"joinUrl": "joinUrlLink"
},
"calendar@odata.associationLink": "https://graph.microsoft.com/v1.0/users('userId')/calendars('calendarId')/$ref",
"calendar@odata.navigationLink": "https://graph.microsoft.com/v1.0/users('userId')/calendars('calendarId')"
}
I can get the two, but I do not find any link or any Id referring to the other object.
Would you know how to find the Calendar Event associated to a Bookings Appointment ?