Skip to content

Instantly share code, notes, and snippets.

@evenevan
Last active September 6, 2024 06:23
Show Gist options
  • Save evenevan/ca4e79fe3f346dc86599d9d53daa35de to your computer and use it in GitHub Desktop.
Save evenevan/ca4e79fe3f346dc86599d9d53daa35de to your computer and use it in GitHub Desktop.
Export Microsoft Teams chats with a work or school account
@evenevan
Copy link
Author

evenevan commented Sep 3, 2023

Hi! thanks for your work. I want to report you that each chat with square brackets [ ] fail to export:

image

easy to fix, just add after line 156 : $name = $name -replace '[[]]','_'

result: image

Bye :)

Hey! Thanks for the fix, but I've pushed a slightly different fix for your issue that preserves the square brackets; the issue was an oversight on wildcard paths and just required changing parameters.

Is there a way to also embed in the chat all sent and received files ? right now in the exported html there is just the link to sharepoint.

I've glanced through the process of downloading SharePoint files and I have concluded that for the time being, I don't have the time to try and make it work.

If you're up for it, you could open an an issue/pull request and work on an implementation. Otherwise, I may try adding this later on once I get some time. Although far from ideal, another solution is simply having all of the files available separately (you should have a folder name "Microsoft Teams Chat Files" in your org's OneDrive that has your uploaded files, but do note this doesn't include files uploaded by others).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment