Share via

How to get all messages from 01/01/2024 to 08/31/2025

JOHNSON, LAVADA 0 Reputation points
2026-04-29T14:19:43.85+00:00

Several employees are not visible that I have had chats with, I don't recall the names I had so many. Looking for all employees from 01/01/2024 to 08/31/2025.

Microsoft Teams | Microsoft Teams for business | Chats | Search messages and conversations
0 comments No comments

2 answers

Sort by: Most helpful
  1. Killian N 400 Reputation points Independent Advisor
    2026-04-29T16:20:46.0766667+00:00

    Hi @JOHNSON, LAVADA,  

    Thank you for reaching out to the Microsoft Q&A forum and sharing the details of your issue.  

    I understand the importance of accessing the full history of a Teams chat, especially when it's needed for legal purposes. I’ll walk you through the steps to help you get the information you need as smoothly as possible.  

    1/ Start by Checking the Chat in Microsoft Teams  

    • Open Microsoft Teams and go to the chat you’re referring to.  
    • Scroll through the conversation to view the messages. Teams retains chat history unless messages were deleted or your organization has specific retention policies.  

    2/ If you need a complete record for legal use  

    • Please reach out to your organization’s Microsoft 365 administrator or IT department.  
    • They can perform a Content Search or use eDiscovery tools in the Microsoft Purview Compliance Portal to retrieve the full chat history, including deleted messages if available.  

    3/ Try to Check Audit Logs (if applicable)  

    • Open your browser and go to Search | Microsoft Purview  
    • Sign in using your Microsoft 365 admin account.  
    • In the left-hand navigation pane, select Audit.  
    • From there, you can start a search by specifying the date range, users, and activities (such as Teams messages, file access, etc.).    User's image

    4/ Once the search is complete, your admin can export the chat history in a readable format (such as CSV or PST), which can then be shared with you securely.  

     

    If you’re unsure who to contact within your organization, I recommend reaching out to your IT department or your administrator. They’ll have the necessary permissions to assist you further.  

    Note: Please understand that my initial response does not always resolve the issue immediately. However, with your help and more detailed information, we can work together to find a solution.  

    I hope this information is useful. Additionally, as other users have raised similar concerns and may not be aware of where to share their feedback, I hope this response helps clarify the situation and suggests a potential next step. Highlighting this information can make it more visible to others in the community who may be facing the same issue, making it easier for them to find guidance and contribute their feedback as well. 

    Thank you again for your time and for raising this important usability concern. If you have any further questions or need additional assistance, please don’t hesitate to reach out. 

    I look forward to your thoughts on this. 


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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  


  2. Q&A Assist
    2026-04-29T14:20:06.6666667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To retrieve all Microsoft Teams chat messages for a user across a specific date range (for example, 01/01/2024–08/31/2025), use Microsoft Graph’s Teams chat export APIs and then filter by date in the client or processing logic.

    Below is a practical approach using Microsoft Graph and (optionally) Graph PowerShell.

    1. Use chats getAllMessages to export all chat messages

    Use the application permission API to pull all chat messages for the user, then filter locally to the desired date range.

    HTTP request:

    GET /users/{id-or-upn}/chats/getAllMessages
    

    Notes:

    • Returns all messages from all chats (1:1, group, and meeting chats) in which the user is a participant.
    • Requires an app with Chat.Read.All (or Chat.ReadWrite.All) application permission and admin consent.
    • Use this when messages may be older than 8 months, or when a full export is needed. After retrieving, filter messages where createdDateTime is between 2024-01-01T00:00:00Z and 2025-08-31T23:59:59Z.
    1. Use chatMessage delta for ongoing sync (last 8 months)

    If only the last 8 months are needed, or after an initial export, use the delta API to keep data up to date.

    • The delta API returns messages from all chats in which the user participates and supports full and incremental sync.
    • It only returns messages from the last eight months; for older content, use getAllMessages.

    Process:

    1. Call the delta function to get an initial full sync of the last 8 months.
    2. Save the @odata.deltaLink from the response.
    3. For subsequent runs, call the URL in @odata.deltaLink to get only new/changed messages.
    4. In each response, filter messages by createdDateTime into the desired date window.
    5. PowerShell options with Microsoft Graph PowerShell SDK

    If using PowerShell, the Teams module exposes delta-based cmdlets that align with the REST APIs:

    • Get-MgUserChatMessageDelta
    • Get-MgChatMessageDelta

    These cmdlets:

    • Return messages from all chats in which the user is a participant.
    • Support delta query semantics (@odata.nextLink / @odata.deltaLink).

    Example high-level flow (pseudo-steps):

    1. Connect with an app that has Chat.Read.All application permission.
    2. Run Get-MgUserChatMessageDelta -UserId <userId> to get messages.
    3. Store the delta link for incremental runs.
    4. Filter the returned objects by createdDateTime between 2024-01-01 and 2025-08-31.

    The -Search parameter exists on these cmdlets, but the context only documents it as a simple string parameter; use it for keyword searches if needed, and still apply date filtering in PowerShell (for example, with Where-Object on createdDateTime).

    1. Identifying all employees chatted with in that period

    Once messages are exported and filtered by date:

    • Extract the participants (sender and recipients) from each message.
    • Build a distinct list of user IDs or display names from those messages.
    • That list represents all employees the user had chats with between 01/01/2024 and 08/31/2025, including those no longer visible in the Teams client.

    Summary:

    • Use GET /users/{id}/chats/getAllMessages for a complete export, then filter by createdDateTime for 01/01/2024–08/31/2025.
    • Use chatMessage: delta (or Get-MgUserChatMessageDelta / Get-MgChatMessageDelta) for ongoing incremental sync (last 8 months), again filtering by createdDateTime.
    • From the filtered messages, derive the list of all employees involved in chats in that date range.

    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.