Graph API
3 TopicsCreate bookingStaffMember also requires Add-MailboxPermission
I created an Entra application with the required Graph permissions to manage Bookings scheduling mailboxes so that I could update the staffing for a Bookings page that I'm not a staff member of. Using that application to request a Microsoft Graph access token, meant I had the required permissions to add a user account (that already had a Bookings license) as an "administrator" (role) for a Bookings page (Bookings business), to replace another person who was the previous Bookings page administrator, but who had since left. I used https://learn.microsoft.com/en-us/graph/api/bookingbusiness-post-staffmembers?view=graph-rest-1.0&tabs=powershell to do this. For the record, I was not able to do this using https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.bookings/new-mgbookingbusinessstaffmember?view=graph-powershell-1.0 using Microsoft.Graph.Bookings module version 2.30.0, presumably because I am not a staff member with the Bookings "administrator" role for that particular Bookings page. However, the newly added user could not access that Bookings page at https://outlook.office.com/bookings/homepage until a further step had been completed (Error: "You don't have access to this booking page" shows instead). To ensure the new Bookings page administrator could access the Bookings page, I needed to add mailbox permissions, which I used https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/add-mailboxpermission?view=exchange-ps for. I found that giving the new Bookings page administrator full access to the scheduling mailbox ensured they could access the Bookings page. Example using ExchangeOnlineManagement PowerShell module: Add-MailboxPermission -Identity email address removed for privacy reasons -User email address removed for privacy reasons -AccessRights FullAccess If there is a more efficient way for an system admin to add new staff to a Bookings page, please let me know - otherwise, hopefully this helps someone who gets stuck 😊27Views0likes0CommentsUpdate of full-day event results in "OverBooking Slot" error message when using app access token
I'm using the Microsoft Graph API with the PHP package https://packagist.org/packages/microsoft/microsoft-graph. I want to update an appointment and add a new customer to it. This works fine as long as the event has a duration of e.g. 4 hours (from 08:00 to 12:00) and even if the event is at night time outside of normal working hours. But as soon as I check the checkbox for a full-day event and send an API request for it, I get a response "400 Bad Request" for a PATCH request to https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{bookingBusiness-id}/appointments/{bookingAppointment-id}: { "code": "UnknownError", "message": "{\"error\":{\"message\":\"OverBooking Slot\",\"code\":\"Bad Request\"}}", } By using a personal access token from the Microsoft Graph Explorer (and not the API app access token), I can successfully submit a request for a full-day event and add a new customer (as long as I don't include the attributes "selfServiceAppointmentId" and "anonymousJoinWebUrl", but that's another story). Does anybody have an idea why I get an error message when using the app access token and how I could avoid it?660Views1like1CommentUpdate of appointment with Graph API results in error ".NET number values [...] cannot be written"
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/{bookingAppointment-id}):, 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?959Views2likes1Comment