[Graph API] System Messages Inconsistency.

Artsiom Rusak 6 Reputation points
2022-07-12T22:32:19.873+00:00

Hello

I'm using this documentation to subscribe to system messages from Teams using Graph API - https://learn.microsoft.com/en-us/graph/system-messages.

There is a list of system messages and places (chats, channels, etc.) where those events might be raised - https://learn.microsoft.com/en-us/graph/system-messages.

Unfortunately, there are several issues:

  1. I can't get callStartedEventMessageDetail in 1-1 chat. Could you please provide any info how this system event could be retrieved in 1-1 chat?
  2. Once I'm in a group chat I'm able to retrieve the callStartedEventMessageDetail and callEndedEventMessageDetail, but the json schema defined for those contracts is a little bit different.
    For example I retrieved those system messages while doing a call in a group chat:
    callStartedEventMessageDetail :
    {  
      "@odata.context": "https://graph.microsoft.com/$metadata#chats('19%3A16974b929af840df8dbce14a11064be4%40thread.v2')/messages/$entity",  
      "id": "1657661644786",  
      "replyToId": null,  
      "etag": "1657661644786",  
      "messageType": "unknownFutureValue",  
      "createdDateTime": "2022-07-12T21:34:04.786Z",  
      "lastModifiedDateTime": "2022-07-12T21:34:04.786Z",  
      "lastEditedDateTime": null,  
      "deletedDateTime": null,  
      "subject": null,  
      "summary": null,  
      "chatId": "19:16974b929af840df8dbce14a11064be4@thread.v2",  
      "importance": "normal",  
      "locale": "en-us",  
      "webUrl": null,  
      "from": null,  
      "body": {  
        "contentType": "html",  
        "content": "<systemEventMessage/>"  
      },  
      "channelIdentity": null,  
      "attachments": [],  
      "mentions": [],  
      "onBehalfOf": null,  
      "policyViolation": null,  
      "reactions": [],  
      "replies": [],  
      "hostedContents": [],  
      "eventDetail": {  
        "@odata.type": "#Microsoft.Teams.GraphSvc.callStartedEventMessageDetail",  
        "callId": null,  
        "callEventType": "call",  
        "initiator": {  
          "application": null,  
          "device": null,  
          "user": {  
            "userIdentityType": "aadUser",  
            "id": "0845dc5e-73bc-4730-9e98-02626f220b6b",  
            "displayName": null  
          }  
        }  
      }  
    }  
    

callEndedEventMessageDetail :

   {  
     "@odata.context": "https://graph.microsoft.com/$metadata#chats('19%3A16974b929af840df8dbce14a11064be4%40thread.v2')/messages/$entity",  
     "id": "1657661676357",  
     "replyToId": null,  
     "etag": "1657661676357",  
     "messageType": "unknownFutureValue",  
     "createdDateTime": "2022-07-12T21:34:36.357Z",  
     "lastModifiedDateTime": "2022-07-12T21:34:36.357Z",  
     "lastEditedDateTime": null,  
     "deletedDateTime": null,  
     "subject": null,  
     "summary": null,  
     "chatId": "19:16974b929af840df8dbce14a11064be4@thread.v2",  
     "importance": "normal",  
     "locale": "en-us",  
     "webUrl": null,  
     "from": null,  
     "body": {  
       "contentType": "html",  
       "content": "<systemEventMessage/>"  
     },  
     "channelIdentity": null,  
     "attachments": [],  
     "mentions": [],  
     "onBehalfOf": null,  
     "policyViolation": null,  
     "reactions": [],  
     "replies": [],  
     "hostedContents": [],  
     "eventDetail": {  
       "@odata.type": "#Microsoft.Teams.GraphSvc.callEndedEventMessageDetail",  
       "callId": null,  
       "callDuration": "PT33S",  
       "callEventType": "call",  
       "callParticipants": [  
         {  
           "participant": {  
             "application": null,  
             "device": null,  
             "user": {  
               "userIdentityType": "aadUser",  
               "id": "0845dc5e-73bc-4730-9e98-02626f220b6b",  
               "displayName": "Artem Rusak"  
             }  
           }  
         }  
       ],  
       "initiator": {  
         "application": null,  
         "device": null,  
         "user": {  
           "userIdentityType": "aadUser",  
           "id": "0845dc5e-73bc-4730-9e98-02626f220b6b",  
           "displayName": null  
         }  
       }  
     }  
   }  

Based on documentation I don't expect to have messageType as unknownFutureValue.
I'm subscribing to those events to acquire the callId value, but the callId value for Call Started and Call ended events is null which makes those system events absolutely useless.

Could you please suggest whether it's an issue on Graph API side or I did smth wrong?

P.S. I'm subscribing to the specific chat subscriptions as described in documentation.
P.S.S I see that pretty the same issue (https://learn.microsoft.com/en-us/answers/questions/782232/missing-eventmessagedetail39s.html) has been raised more than 3 months ago - no answer...

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,644 questions
{count} vote