How to get Chat ID from Teams Chat UI?

Kripa 140 Reputation points
2024-11-07T19:00:27.1466667+00:00

The reference link Here,

I have tried to use one to one chat and extracted manually from Teams Chat UI.

By clicking on any chat and navigate to three dots and copying the link and from link i m extracting

kind of this :

**(Single chat with others)Chat ID:19:****@unq.gbl.spaces

(Meeting Group chat)Chat ID:19:meeting_NGIyODgzMWItMTNjNy00ZGZlLTk4ZjMtZTY0NmFkZWVlMGY3@thread.v2

I tried both of them

Graph API:

GET beta/users/{user_ID}/chats/{chat-id}

GET /chats/{chat-id}

but facing error:

User's image

How will i get valid Chat ID?

please assist me!!!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,068 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,563 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yakun Huang-MSFT 9,940 Reputation points Microsoft Vendor
    2024-11-08T03:05:37.7833333+00:00

    Hello Kripa,

    Thank you for reaching out to Microsoft Support!

    After testing, the chat ID extracted manually in the Teams Chat UI is valid, for your error, first you need to check that the account teams is logged in to is the same as the account Graph Explorer is logged in to.

    If you have no problems logging into your account, use the List chats endpoint to list all chats in your account and check if the chat ID you manually extracted exists.

    Finally, it should be noted that, to access a chat, at least one chat member must belong to the tenant the request initiated from.

    Hope this helps.

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

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Prasad-MSFT 8,506 Reputation points Microsoft Vendor
    2024-11-08T06:38:32.4166667+00:00

    Kripa,

    Using the Ids in similar manner (as u did), we are able to get the chat details without any error.

    User's image

    So please verify you are logged in using appropriate account and the ID used in request is correct.

    0 comments No comments

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.