Graph API - Get All Messages - Incoming Only

BradHarrison-9077 21 Reputation points
2024-05-02T14:53:03.61+00:00

I am using Postman to connect to a Graph API in order to pull & export a users Teams Chat History. Everything is setup and I am able to get results, however I only seem to be pulling incoming messages. Is this as designed or is there a way to pull both incoming & outgoing messages from a specific user?

I am using the standard query "GET https://graph.microsoft.com/v1.0/users/{id}/chats/getAllMessages" and I have the following permissions applied:

channelMessage.Read.All

Chat.Read.All

Chat.Read.WhereInstalled

ChatMessage.Read.All

User.Read.All

FWIW - I am very new to this

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. Hitesh Pachipulusu - MSFT 3,620 Reputation points Microsoft External Staff
    2024-05-03T21:23:56.8666667+00:00

    Hello Brad,

    I tested the API locally and it worked fine for me.

    Please check the below screenshots from postman app.

    User's image

    User's image

    Please refer to the documentation for more information. https://learn.microsoft.com/en-us/graph/api/chats-getallmessages?view=graph-rest-1.0&tabs=http

    Hope this helps.

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

    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.