microsoft-authentication-library-for-dotnet icon indicating copy to clipboard operation
microsoft-authentication-library-for-dotnet copied to clipboard

[Feature Request] How to handle consent bundles?

Open willfiddes opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. After a acquireTokenSilent fails, when calling acquireTokenSilent again, it does not call the token endpoint. It just returns a cached error message. This will only get resolved if "successfully" calling acquireTokenInteractive

This creates a poor experience on handling bundle consents. Developers have to create an entire different process/code to "pre-consent" their clients and APIs. When it is possible to allow the client to perform bundle consent and wait until the servicePrincipals are provisioned with the permissions, before a refresh token flow can be successful.

Describe the solution you'd like Have an option to force MSAL to call token endpoint again with acquireTokenSilent after a failed attempt and without having to first call acquireTokenInteractive.

This could be clear error state or a force method

Describe alternatives you've considered Add a ~10 second delay (risk as this might take longer) before calling acquireTokenSilent

Additional context We should implement this in all MSAL SDKs across the various platforms/languages

willfiddes avatar May 24 '23 21:05 willfiddes

Could you give more details about "bundle consents"?

bgavrilMS avatar May 26 '23 16:05 bgavrilMS