Graph API error when querying BookingBusinesses - ErrorExceededFindCountLimit, The GetBookingMailboxes request returned too many results


You are trying to get booking businesses using GET request using Graph API but receive ErrorExceededFindCountLimit error.
|Request --> GET
Microsoft Graph API error ErrorExceededFindCountLimit
Microsoft Graph API error ErrorExceededFindCountLimit
  "error": {
    "code": "ErrorExceededFindCountLimit",
      "The GetBookingMailboxes request returned too many results. Please specify a query to limit the results.",


Service account is setup in Azure AD with App Registration with necessary permissions - Bookings.Read.All, BookingsAppointment.ReadWrite.All, Bookings.ReadWrite.All, Bookings.Manage.All. But you receive error when executing the code.

As the error states "returned too many results", the return values look to be beyond the set threshold. Getting the list of bookingBusinesses may also fail when an organization has several Bookings businesses and the account making the request is not an administrator.

⛏️ Fix ErrorExceededFindCountLimit error when querying bookingBusinesses using Microsoft Graph ?

Limit the request to return the set of businesses by including a query parameter. This will limit the result set and return the businesses that have given search text in their name or e-mail address.

Using this approach, you can now pass the name or email id of the business that you want to query and fetch limited results.
Try Out Code2care Dev Tools:


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

πŸŽ‰ We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.