how we can filter the chat messages and get only those records which have callRecordingUrl not empty?

Parth Kumar 66 Reputation points
2023-06-07T13:06:20.33+00:00

i need to get only those messages which have callRecordingUrl value.

i am using GET /chats/{chat-id}/messages/{message-id} API

response is like :

[8] => Array
        (
            [id] => 1686136544105
            [replyToId] =>
            [etag] => 1686136545452
            [messageType] => unknownFutureValue
            [createdDateTime] => 2023-06-07T11:15:44.105Z
            [lastModifiedDateTime] => 2023-06-07T11:15:45.452Z
            [lastEditedDateTime] =>
            [deletedDateTime] =>
            [subject] =>
            [summary] =>
            [chatId] => 19:meeting_ZWM5YjZjZDYtNWQ1ZS00ZDg3LTkyYjUtNzdmZWYyMzI0Y2I2@thread.v2
            [importance] => normal
            [locale] => en-us
            [webUrl] =>
            [from] =>
            [channelIdentity] =>
            [policyViolation] =>
            [body] => Array
                (
                    [contentType] => html
                    [content] => 
                )

            [attachments] => Array
                (
                )

            [mentions] => Array
                (
                )

            [reactions] => Array
                (
                )

            [eventDetail] => Array
                (
                    [@odata.type] => #microsoft.graph.callRecordingEventMessageDetail
                    [callId] => 0dcc3927-53fc-41dd-9419-9e201f2034de
                    [callRecordingDisplayName] => JOIN HERE  DataStage Training 05 June to 12 June 2023 0900 AM to 0600 PM IST-20230607_111544-Meeting Recording.mp4
                    [callRecordingUrl] => https://sfjblr-my.sharepoint.com/:v:/g/personal/user_sfjbs_in/Edyn9vpjxh9MokKHgbjtdyMBk_ztpSL-L2wfpOs6koUyRA
                    [callRecordingDuration] => PT4H
                    [callRecordingStatus] => success
                    [meetingOrganizer] => Array
                        (
                            [application] =>
                            [device] =>
                            [user] => Array
                                (
                                    [@odata.type] => #microsoft.graph.teamworkUserIdentity
                                    [id] => f1b055da-d801-4a1c-8f43-b109a10e9116
                                    [displayName] =>
                                    [userIdentityType] => aadUser
                                )

                        )

                    [initiator] => Array
                        (
                            [application] =>
                            [device] =>
                            [user] => Array
                                (
                                    [@odata.type] => #microsoft.graph.teamworkUserIdentity
                                    [id] => f1b055da-d801-4a1c-8f43-b109a10e9116
                                    [displayName] =>
                                    [userIdentityType] => aadUser
                                )

                        )

                )

        )
Microsoft Teams | Development
Microsoft Security | Microsoft Graph
Microsoft Teams | Microsoft Teams for business | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Prasad-MSFT 9,061 Reputation points Microsoft External Staff Moderator
    2023-06-09T07:03:41.5766667+00:00

    Graph API implements paging for certain API. For List chat messages API, 20 message is the limit currently. The API response has "@odata.nextLink" property with the link to fetch next 20 messages.

    Sample Response

    "@odata.context": "https://graph.microsoft.com/beta/LongUrlShort/messages",
    "@odata.count": 20,
    "@odata.nextLink": "https://graph.microsoft.com/beta/me/chats/LongUrlhSort",
    

    So you need to handle it while calling the API. You can make the API call in loop and get all the records.

    Thanks, 

    Prasad Das

    ************************************************************************* 

    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link.

    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.