question

MicrosoftTeamCacheissues-2298 avatar image
0 Votes"
MicrosoftTeamCacheissues-2298 asked TimonYang-MSFT commented

How to clear Microsoft Teams cache for Global users

Hi All

We have an customised application which will be attached with MS Teams to operate.
Users have encountered some issue with UI. After the fix has been deployed, many users were able to see the expected results.
But few users are not. They were able to see the expected results only after clearing MS Teams cache in their machine.

We can't able to clear the cache manually for each users. Kindly let us know, is there any option to clear the Teams cache globally?

Kindly suggest your ideas on it.

dotnet-csharpdotnet-standard
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MicrosoftTeamCacheissues-2298
I have not heard from you for a couple of days. Please let me know if there is anything that I can help here.

0 Votes 0 ·

1 Answer

TimonYang-MSFT avatar image
0 Votes"
TimonYang-MSFT answered

I did not find an existing API to directly clear the cache, but we know the location of the cache:

C:\Users\<username>\AppData\Roaming\Microsoft\Teams

We can delete him in this way:

 System.IO.DirectoryInfo di = new DirectoryInfo("YourPath");
    
 foreach (FileInfo file in di.GetFiles())
 {
     file.Delete(); 
 }
 foreach (DirectoryInfo dir in di.GetDirectories())
 {
     dir.Delete(true); 
 }

There are two things to pay attention to.

One is that this program may require administrator rights to run, and the other is that Outlook and Teams have a certain degree of integration, so you need to exit both Teams and Outlook to delete successfully.


If the response is helpful, please click "Accept Answer" and upvote it.
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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.