0
votes

I have been using "https://graph.microsoft.com/beta/chats/{id}/messages" this Ms-Graph API to retrieve the Chat Messages for (Direct/Group Chat) in Microsoft Teams. I get first set of response (i.e. 20 Messages) but when i try to get the next set of messages using the "@odata.nextLink" property i encountered "Bad Request" error.

Is there any other way to retrieve the Next set of Chat Messages from Group/Direct Chat in Microsoft Teams?

1
I am not quite sure but I suspect Graph API you are using is Beta and hence the issue. When you mean Group Chat, do you mean Group Conversation?AnkUser
We are checking this error it internally. The workaround for this is - use query parameter.. This will get you top number of resultsAbhijit

1 Answers

0
votes

Please use the query parameters $skip in conjunction with $top to have finer control over the result if nextLink is not working ( could be because it's still in Beta). For example, use the below query to get 30 entries after skipping 30 entries

https://graph.microsoft.com/beta/chats/{id}/messages?$top=30&$skip=30