Skip to content

Commit 5a75a75

Browse files
committed
plaintext fallback mode
1 parent 92d3d72 commit 5a75a75

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,22 @@ namespace CommonCacheMsalV3
580580

581581
---
582582

583+
## Plain text fallback mode
584+
585+
MSAL allows you to store unencrypted tokens in clear text. This is intended for use in development environments for debugging purposes only.
586+
You can use the plain text fallback mode using the following code pattern.
587+
588+
```csharp
589+
storageProperties =
590+
new StorageCreationPropertiesBuilder(
591+
Config.CacheFileName + ".plaintext",
592+
Config.CacheDir)
593+
.WithUnprotectedFile()
594+
.Build();
595+
596+
var cacheHelper = await MsalCacheHelper.CreateAsync(storageProperties).ConfigureAwait(false);
597+
```
598+
583599
## Next steps
584600

585601
The following samples illustrate token cache serialization.

0 commit comments

Comments
 (0)