How to fix 409 conflict issue in MS Bookings API

Sivaranjani Arivazhagan 0 Reputation points
2025-07-24T13:31:30.8366667+00:00

Hi,

I'm trying to use the Microsoft Bookings API to create staff members, but I’m encountering a 409 Conflict error with the following response:

{
    "statusCode": 409,
    "message": "A staff member already exists"
}


However, when I use the Get Staff List API, the staff member doesn't appear in the list. Interestingly, I'm able to add the same staff member successfully through the MS Bookings web portal.

Could you please help me understand why this conflict error is occurring via the API, even though the staff isn’t listed?

Microsoft 365 and Office | Development | Microsoft 365 Developer Program
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Gabriel-N 3,705 Reputation points Microsoft External Staff Moderator
    2025-07-24T15:18:16.3166667+00:00

    Hi Sivaranjani Arivazhagan

    Thank you for reaching out via the Microsoft Q&A forum.

    To help isolate the issue, could you kindly confirm whether this error occurs when attempting to add a completely new user who has never existed in the system before?

    Based on my research, it appears the issue is specific to scenarios involving the re-addition of previously deleted users. This stems from a fundamental difference in how the user portal and the underlying API handle user deletion.

    • API Behavior: The API’s POST command is strictly intended for creating new resources. If it detects that a user already exists, whether active or recently deleted, it returns a 409 Conflict error. This is expected behavior, as the API cannot create a duplicate record.
    • Portal Behavior: The web portal is designed to be more user-friendly. It first checks for existing users and, if found, links the existing account to the Bookings business rather than attempting to create a new one. This is why the action succeeds in the portal.

    In summary, the portal may be attempting to "reactivate" the user, while the API is trying to "create new," which fails because the user is not truly new from the database’s perspective.

    Additionally, you may find that there are other threads reporting the same error code in situations similar to the one I’ve described.

    I hope this clarifies the situation for you. Please let us know if you have any further questions.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Image preview

    0 comments No comments

  2. Sivaranjani Arivazhagan 0 Reputation points
    2025-07-25T06:09:08.53+00:00

    Hi,

    Thank you for your response.

    To answer your question:

    Approach 1: Yes, the user exists in Azure AD. I'm using the user's email and display name to create the staff member for the business via the API.

    • Approach 2: I also tried using a completely new user who does not exist in Azure AD, but I still received the same 409 error.

    Could you please guide me on the correct way to add staff members using the API?

    Thanks,
    Siva


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.