question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New command: Export Microsoft Teams messages for the given user or team

See original GitHub issue

Usage

m365 teams message export [options]

Description

Export Microsoft Teams chat messages for a given user, or a team.

Options

Option Description
--userId [userId] The Id of the user whose messages are to be exported. Specify either userId, userName or teamId
--userName [userName] The UPN of the user whose messages are to be exported. Specify either userId, userName or teamId.
--teamId [teamId] The Id of the team of which the messages are to be exported. Specify either userId, userName or teamId.
--fromDateTime[fromDateTime] The start of time range to query
--toDateTime[toDateTime] The end of time range to query
-l, --licenseModel [licenseModel] License requirements are applicable on the protected Teams export API. Allowed values are modelA, modelB, evaluation. The default is evaluation. Read more about the license requirements.
-a, --withAttachments When specified, the command will also download all chat attachments. Use folderPath as well to set the rootfolder.
-p, --folderPath [folderPath] The folder path to save downloaded attachments to when using withAttachments.

Remarks

Microsoft Teams APIs in Microsoft Graph that access sensitive data are considered protected APIs. Export APIs require that you have additional validation, beyond permissions and consent, before you can use them. To request access to these protected APIs, complete the request form

Additional Information

https://docs.microsoft.com/en-us/microsoftteams/export-teams-content#how-to-access-teams-export-apis

Prerequisites to access this API

https://docs.microsoft.com/en-us/microsoftteams/export-teams-content#prerequisites-to-access-teams-export-apis

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:42 (42 by maintainers)

github_iconTop GitHub Comments

2reactions
martinlingstuylcommented, Oct 10, 2022

Do we need the pageSize and pageNumber options?

We don’t!

I’d suggest we rename --filePath to --folderPath, since we want people to point to a folder rather than a file

🤦‍♂️ OMC (Cussing for nerds 2.0: oh my code)

updated the specs…

1reaction
Adam-itcommented, Oct 15, 2022

@waldekmastykarz any comments? it has been a long run 🙂 @martinlingstuyl should we open it up ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Export content with the Microsoft Teams Export APIs
Teams Export APIs allow you to export 1:1, group chat, meeting chats, and channel messages from Microsoft Teams. If your organization needs ...
Read more >
How to export an entire Teams chat history with an individual ...
1. Sign in to the Export page with your Microsoft Account. · 2. Select the option to download your Chat history, Media, or...
Read more >
Export messages from Teams Chat? - Microsoft Community
1. Open Teams into the Browser, Chrome for instance · 2. Select all the conversation, right click and select Print as PDF ·...
Read more >
Search for and export Teams chat data for on-premises users
If a Microsoft Teams-enabled user has an on-premises mailbox and their user account/identity has been synched to the cloud, Microsoft creates ...
Read more >
Announcing general availability of Microsoft Graph Export API ...
Microsoft Graph Export API for Teams supports exporting Teams messages and message hosted content for a particular user or team that is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found