Aug 22 2023 05:27 AM - edited Aug 22 2023 05:29 AM
I'm trying to update an appointment by first getting all attributes with a GET request (https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{bookingBusiness-id}/appointments/{book...):, changing some values and then sending an update with a PATCH request. This worked fine until yesterday (2023-08-21), but today I get a "400 Bad Request" response and this error message:
{
"code": "UnknownError",
"message": "{\"error\":{\"message\":\".NET number values such as positive and negative infinity cannot be written as valid JSON. To make it work when using 'JsonSerializer', consider specifying 'JsonNumberHandling.AllowNamedFloatingPointLiterals' (see https://docs.microsoft.com/dotnet/api/system.text.json.serialization.jsonnumberhandling).\",\"code\":\"Bad Request\"}}"
}
The problem is the value of the attributes in "serviceLocation.coordinates". The GET request returns this response:
"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"
}
}
If I change the values of "altitude", "latitude", "longitude", "accuracy" and "altitudeAccuracy" to "null", the PATCH request works fine without an error. I also found out that I get the "NaN" values here if I use an app access token with MS Graph API. If I use my personal access token, I get the value "null" for all of these attributes.
Does anybody know why and how this has changed since yesterday?
Sep 04 2023 06:32 AM - edited Sep 04 2023 06:34 AM
We have the same problem in production. It looks like the Graph API has been modified to implement missing validation logic on the values. We had to do an emergency release to fix and set the values to "null". There was no notification of the change to the Bookings Graph API implementation.