Microsoft Bookings API - not found, exception, denied

41 Views Asked by At

I would like to literally get all the business bookings data like staff member and a customer. But I find this API very difficult to work out - probably sth likely to do with my company IT set up / permissions - which I cannot figure out?

Anyway, all permission granted, tokens generated, I can get a response from: https://graph.microsoft.com/beta/bookingBusinesses

With the account I am interested in: [email protected]

Then when I try to get anything specific for it: https://graph.microsoft.com/beta/bookingBusinesses/[email protected]/appointments

I get:

"error": {
    "code": "NotFound",
        "message": "Not Found",
        "innerError": { - nth here just guid and date

When I try it for my own email account - I get "Unknown error".

With the following query: https://graph.microsoft.com/beta/bookingBusinesses/[email protected]/calendarView?start=2024-01-01T00:00:00Z&end=2024-01-21T00:00:00Z

I again get:

"error": {
    "code": "NotFound",
        "message": "Not Found",
        "innerError": { - nth here just guid and date

But when I try my own personal email address - I get all my calendar meetings.

As the business meetings for [email protected] follow specific format XYZ-Meeting-ClientName I could in theory query all staff members and get the data that way by extracting it from the title but it sounds wrong and I'm missing a lot of other info like client email address or if the meeting has actually happened, this is what the JSON response looks like:

{
            "id": "145_characters_long_id_bcAAA=",
            "selfServiceAppointmentId": "",
            "additionalInformation": "",
            "isLocationOnline": true,
            "onlineMeetingUrl": "url_here",
            "joinWebUrl": "url_here",
            "customerId": "",
            "customerName": "",
            "customerEmailAddress": "",
            "customerPhone": "",
            "customerTimeZone": "",
            "customerNotes": "",
            "serviceId": "",
            "serviceName": "XYZ-Meeting-ClientName",
            "duration": "PT30M",
            "preBuffer": "PT0S",
            "postBuffer": "PT0S",
            "priceType": "undefined",
            "price": 0.0,
            "serviceNotes": "",
            "optOutOfCustomerEmail": false,
            "staffMemberIds": [],
            "invoiceAmount": 0.0,
            "invoiceId": null,
            "invoiceStatus": "draft",
            "invoiceUrl": null,
            "smsNotificationsEnabled": false,
            "anonymousJoinWebUrl": "",
            "maximumAttendeesCount": 0,
            "filledAttendeesCount": 0,
            "createdDateTime": "2024-01-02T18:40:21.4945606Z",
            "lastUpdatedDateTime": "2024-01-18T10:01:01.17179Z",
            "appointmentLabel": "",
            "customerLocation": null,
            "invoiceDate": null,
            "start": {
                "dateTime": "2024-01-18T10:00:00.0000000Z",
                "timeZone": "UTC"
            },
            "end": {
                "dateTime": "2024-01-18T10:30:00.0000000Z",
                "timeZone": "UTC"
            },
            "serviceLocation": {
                "displayName": "",
                "locationEmailAddress": "",
                "locationUri": "",
                "locationType": "default",
                "uniqueId": null,
                "uniqueIdType": null,
                "address": {
                    "type": "unknown",
                    "postOfficeBox": "",
                    "street": "",
                    "city": "",
                    "state": "",
                    "countryOrRegion": "",
                    "postalCode": ""
                },
                "coordinates": {
                    "altitude": 0.0,
                    "latitude": 0.0,
                    "longitude": 0.0,
                    "accuracy": 0.0,
                    "altitudeAccuracy": 0.0
                }
            },
            "reminders": [],
            "customers": []
        }, 

And then trying to get data just for that specific meeting itself: https://graph.microsoft.com/beta/bookingBusinesses/[email protected]/appointments/145_characters_long_id_bcAAA=

error": {
        "code": "NotFound",
        "message": "Appointment id was not found.",
        "innerError": {
            "date": "2024-01-19T10:06:45",
            "request-id": "guid",
            "client-request-id": "same_guid"
        }
    }

I was able to get this meeting from my own calendar, but this query: https://graph.microsoft.com/beta/bookingBusinesses/[email protected]/appointments/145_characters_long_id_bcAAA=

"error": {
        "code": "UnknownError",
        "message": "",
        "innerError": {
            "date": "2024-01-19T10:01:39",
            "request-id": "guid",
            "client-request-id": "same_guid"
        }
    }

Anyone could point in right direction?

0

There are 0 best solutions below