I have started using MSAL. now I have 2 implementation of getting token from MSAL #
##First one is##
app.AcquireTokenForClient(scopes).ExecuteAsync();
## another one is ##
app.AcquireTokenSilent
what is difference between them ?
AcquireTokenSilent() is for user based authentication and AcquireTokenForClient() is for app-only authentication (used in service to service calls, for example).
The AcquireTokenSilent needs an account parameter when called, so it can search the user token cache for a valid accessToken.
The AcquireTokenForClient only needs a scope parameter - there is no user context involved, the accessToken is acquired on behalf of the application itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With