What is the meaning of topic when the chat type is one on one in Graph API for Teams?

Rin 21 Reputation points
2023-07-20T09:43:07.5033333+00:00

I sent a request to this Graph API endpoint: `https://graph.microsoft.com/beta/chats?$expand=members`
This was what I got:
{
   "@odata.context":"https://graph.microsoft.com/beta/$metadata#chats(members())",
   "@odata.count":20,
   "@odata.nextLink":"https://graph.microsoft.com/beta/chats?$expand=members&$skiptoken=**************",
   "value":[
      {
         "id":"**************@unq.gbl.spaces",
         "topic":"8:orgid:b757c088-082c-4e0d-b21c-9d558ae59c25, 8:orgid:68e7bcb9-1f7f-4ed9-b2d7-b494953b4a5b",
         "createdDateTime":"2018-10-02T03:05:43.718Z",
         "lastUpdatedDateTime":"2018-12-06T10:21:42.139Z",
         "chatType":"oneOnOne",
         "webUrl":"https://teams.microsoft.com/l/chat/**************%40unq.gbl.spaces/0?tenantId=**************",
         "tenantId":"**************",
         "onlineMeetingInfo":null,
         "viewpoint":{
            "isHidden":false,
            "lastMessageReadDateTime":"2023-06-08T02:23:27.266Z"
         },
         "members@odata.context":"https://graph.microsoft.com/beta/$metadata#chats('**************-b21c-9d558ae59c25%40unq.gbl.spaces')/members",
         "members":[
            {
               "@odata.type":"#microsoft.graph.aadUserConversationMember",
               "id":"**************=",
               "roles":[
                  "owner"
               ],
               "displayName":"Joe **************",
               "visibleHistoryStartDateTime":"0001-01-01T00:00:00Z",
               "userId":"**************",
               "email":"joe**************.jp",
               "tenantId":"**************"
            },
            {
               "@odata.type":"#microsoft.graph.aadUserConversationMember",
               "id":"**************=",
               "roles":[
                  "owner"
               ],
               "displayName":"Michael **************",
               "visibleHistoryStartDateTime":"0001-01-01T00:00:00Z",
               "userId":"**************",
               "email":"michael**************jp",
               "tenantId":"**************"
            }
         ]
      }
   ]
}

I noticed that there is an attribute `topic` in the payload.
According to the API documentation, it means the subject or topic for the chat.
In that payload, the `chatType` is `oneOnOne`.
For that reason, I expect the payload does not have the `topic` at all, or the value of it would be null (or something similar, like an empty string).
However, the actual value is some list of strings that look like some list of IDs.
What's the meaning of those strings?
I also wonder why there is an attribute `topic` because that's for group chat only, as far as I know.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,446 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ab-8756 800 Reputation points
    2023-08-11T18:36:06.1433333+00:00

    Hello Rin,
    Thank you for reaching out to this Q&A forum.

    Regarding to your query, yes you are correct, when you call the chat endpoint, you'll receive a 'topic' attribute in the payload. This 'Topic' property represents the title of the chat. Keep in mind that the chat title can only be provided for group chats, not for oneOnone chats. So, for oneOnOne chat Topic value is null, the id does not represent anything according to the MS docs, this value might show null or some id. It might be used to differentiate between oneOnone conversations however there is not documentations available yet.
    Hope that answers your question.
    --please don't forget to upvote and Accept as answer if the reply is helpful—
    Thanks.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ab-8756 800 Reputation points
    2023-08-11T18:40:03.2466667+00:00

    Thanks Rin,

    0 comments No comments