Skip to content

Commit 80bf58b

Browse files
authored
Update msal-net-clear-token-cache.md
1 parent 90d4c01 commit 80bf58b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

articles/active-directory/develop/msal-net-clear-token-cache.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ ms.custom: "devx-track-csharp, aaddev"
1818

1919
# Clear the token cache using MSAL.NET
2020

21+
## Web Api and Daemon apps
22+
23+
There is no API to remove the tokens from the cache. Cache size should be handled by setting eviction policies on the underlying storage. See [Cache Serialization](https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-net-token-cache-serialization?tabs=aspnetcore) for details on how to use a memory cache or distributed cache.
24+
25+
## Desktop, command line and mobile applications
26+
2127
When you [acquire an access token](msal-acquire-cache-tokens.md) using the Microsoft Authentication Library for .NET (MSAL.NET), the token is cached. When the application needs a token, it should first call the `AcquireTokenSilent` method to verify if an acceptable token is in the cache.
2228

2329
Clearing the cache is achieved by removing the accounts from the cache. This does not remove the session cookie which is in the browser, though. The following example instantiates a public client application, gets the accounts for the application, and removes the accounts.

0 commit comments

Comments
 (0)