Please understand that our forum is a public platform, and we will modify your question to cover the personal information in the description. Kindly ensure that you hide these personal or organization information next time you post error or some information to protect personal data.
Dear @Automaton Solutions,
Welcome to Microsoft Q&A Forum!
You received the following error when calling the Graph API:
"The provided '#microsoft.graph.aadUserConversationMember' for 'odXXX.type' is not valid for this operation."
This typically indicates that the API is rejecting the request due to one of the following reasons:
1.Unsupported chat type:
The API may only support adding members to group chats (chatType = group). If the chat is a one-on-one or a meeting chat (chatType = oneOnOne or meeting), adding members is not allowed. Please ensure the chat you're targeting is a standard group chat.
2.API version mismatch:
You're currently using the /beta endpoint with a ******@odXXX.bind reference to the /v1.0/users/... path. This mismatch may cause issues. You have two options:
- Switch to the stable /v1.0 endpoint, which now fully supports adding members to group chats.
- Or, if you continue using the /beta endpoint, update the ******@odXXX.bind to reference the beta path: "
******@odXXX.bind": "https://graph.microsoft.com/beta/users/[[USER_ID]]"
3.External users:
If the user you're trying to add is external to your organization, they must first be invited and accepted into your Azure AD tenant. The Graph API does not automatically provision external users.
Therefore, I suggest updating your API call as follows:
- Use the /v1.0 endpoint:
POST https://graph.microsoft.com/v1.0/chats/{chat-id}/members
- Request body:
{
"@odXXX.type": "#microsoft.graph.aadUserConversationMember",
"roles": [],
"visibleHistoryStartDateTime": "0001-01-01T00:00:00Z",
"******@odXXX.bind": "https://graph.microsoft.com/v1.0/users/[[USER_ID]]"
}
- Ensure the chat is a group chat and the user being added is already part of your Azure AD tenant.
Here is a helpful article that you can consult: Add member to a chat
Also, I found several articles that may be related to your situation, please kindly take a look:
- https://learn.microsoft.com/en-us/answers/questions/1377913/issue-adding-member-in-teams-private-channel-throu
- https://community.powerplatform.com/forums/thread/details/?threadid=495e9fb9-04a5-4b05-a3dc-1f3bb4807a16
- https://stackoverflow.com/questions/72995460/the-provided-microsoft-graph-aaduserconversationmember-for-odata-type-is-no Please note that our support is limited to providing guidance based on official Microsoft documentation. Any third-party resources or references shared are intended solely for informational or consultative purposes. Microsoft does not guarantee the accuracy, reliability, or continued availability of third-party content, and we recommend exercising discretion when referring to such materials.
I hope this information can give you some insights and please feel free to update to me in comment section. Wish you a pleasant day!
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.