Skip to content
Discussion options

You must be logged in to vote

ok I managed to implement this.

method call:

AuthManager = PnP.Framework.AuthenticationManager.CreateWithInteractiveLogin(
APP_ID,
null,
TENANT_ID,
PnP.Framework.AzureEnvironment.Production,
tokenCacheCallback: (tokenCache) =>
{
TokenCacheHelper.EnableSerialization(tokenCache);
}
);

token helper class:

using Microsoft.Identity.Client;
using System.IO;

public static class TokenCacheHelper
{
    private static readonly object FileLock = new object();
    private static string CacheFilePath = "msal_token_cache.bin";

    public static void EnableSerialization(ITokenCache tokenCache)
    {
        tokenCache.SetBeforeAccess(BeforeAccessNotification);
        tokenCache.SetAfterAccess(AfterA…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tiagoduarte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant