Skip to content

Commit 6db0940

Browse files
authored
Merge pull request #171998 from maliksahil/plaintextcache
Added text for plaintext fallback mode
2 parents d164089 + 5a75a75 commit 6db0940

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
@@ -592,6 +592,22 @@ namespace CommonCacheMsalV3
592592

593593
---
594594

595+
## Plain text fallback mode
596+
597+
MSAL allows you to store unencrypted tokens in clear text. This is intended for use in development environments for debugging purposes only.
598+
You can use the plain text fallback mode using the following code pattern.
599+
600+
```csharp
601+
storageProperties =
602+
new StorageCreationPropertiesBuilder(
603+
Config.CacheFileName + ".plaintext",
604+
Config.CacheDir)
605+
.WithUnprotectedFile()
606+
.Build();
607+
608+
var cacheHelper = await MsalCacheHelper.CreateAsync(storageProperties).ConfigureAwait(false);
609+
```
610+
595611
## Next steps
596612

597613
The following samples illustrate token cache serialization.

0 commit comments

Comments
 (0)