Hi MohamedSYASSIN-5189,
I am able to replicate your issue at my end.
Please find the below screenshots where I tried to replicate your issue.
Step 1- I have invited guest user to the chat by passing the user’s email address. After executing the send chat message endpoint I faced the same issue as similar as your case.
Step 2- To resolve this issue, I got the guest users’ user-id and I passed that in request body for one-to-one chat. Then the request is successful.
As per MS documentation, the API can not create a new chat message.
You must use the list chats method to retrieve the ID of an existing chat before you can create a chat message.
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".