Skip to content

[Feature Request] Let apps partition their cache easily #5142

@bgavrilMS

Description

@bgavrilMS

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions