Forum Discussion

chrisfellows's avatar
chrisfellows
Copper Contributor
Jun 12, 2023

Get the folder location for Teams chat files and folders for users in different countries

I have an unattended Dot NET Core app (v7.0) for our company and I need to use Graph SDK (or the REST API directly) to delete old Teams chat files and chat recordings for 1 to 1s and meetings but not for channels. (The built in Teams functionality is not suitable for what we need).

 

With Graph SDK then I'm able to enumerate each user and their OneDrive (for business) folders & files but I need to determine which folders to check. I know that the folders are normally "Recordings" & "Microsoft Teams Chat Files" but is this fixed? Some users in non-English speaking countries have told me that their folder name is the translated name.

 

How do I programmatically identify the names of the folders containing the user's recordings and chat files? Do I have to hard-code the folder name list to check? Also, can the folder name by defined by the administrator?

3 Replies

Resources