@@ -43,12 +43,14 @@ public override Task<IAccessToken> Authenticate(AuthenticationParameters paramet
43
43
var authority = spParameters . Environment . ActiveDirectoryAuthority ;
44
44
45
45
var requestContext = new TokenRequestContext ( scopes ) ;
46
- var tokenCachePersistenceOptions = spParameters . TokenCacheProvider . GetTokenCachePersistenceOptions ( ) ;
46
+ // var tokenCachePersistenceOptions = spParameters.TokenCacheProvider.GetTokenCachePersistenceOptions();
47
47
AzureSession . Instance . TryGetComponent ( nameof ( AzureCredentialFactory ) , out AzureCredentialFactory azureCredentialFactory ) ;
48
48
49
49
var options = new ClientCertificateCredentialOptions ( )
50
50
{
51
- TokenCachePersistenceOptions = tokenCachePersistenceOptions , // allows MSAL to cache access tokens
51
+ // commented due to https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/3218
52
+ // todo: investigate splitting user token cache and app token cache
53
+ // TokenCachePersistenceOptions = tokenCachePersistenceOptions, // allows MSAL to cache access tokens
52
54
AuthorityHost = new Uri ( authority ) ,
53
55
SendCertificateChain = spParameters . SendCertificateChain ?? default ( bool )
54
56
} ;
@@ -67,7 +69,7 @@ public override Task<IAccessToken> Authenticate(AuthenticationParameters paramet
67
69
//Service principal with secret
68
70
var csOptions = new ClientSecretCredentialOptions ( )
69
71
{
70
- TokenCachePersistenceOptions = tokenCachePersistenceOptions , // allows MSAL to cache access tokens
72
+ // TokenCachePersistenceOptions = tokenCachePersistenceOptions, // allows MSAL to cache access tokens
71
73
AuthorityHost = new Uri ( authority )
72
74
} ;
73
75
tokenCredential = azureCredentialFactory . CreateClientSecretCredential ( tenantId , spParameters . ApplicationId , spParameters . Secret , csOptions ) ;
0 commit comments