Skip to content

Commit 112a992

Browse files
authored
Merge pull request #101184 from bgavrilMS/patch-21
Update msal-net-clear-token-cache.md
2 parents 3827e28 + f31ed39 commit 112a992

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](msal-net-token-cache-serialization.md?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)