MSAL client type
Confidential
Problem statement
var app = ConfidentialClientApplicationBuilder.Create(clientId)
.WithCertificate(certificate)
.WithAuthority(authority)
.WithAzureRegion(azureRegion)
+ .WithCacheOptions(new() CacheOptions { UseSharedCache=true, CacheKeyPrefix = "some_id"})
.Build();
Proposed solution
This should use the new cache extensibility functionality to add a single key like to the access token. It should work for all flows, although it is acceptable to only allow it for AcquireTokenForClient.
Internally, you can use WithCacheKeyComponents({{ "cache_key_prefix" = id }});
Alternatives
No response