Hello @Jonathan GALLAIS and thanks for reaching out. In order to silently authenticate you need to pass the Account obtained during the AcquireTokenByUsernamePassword call to the AcquireTokenSilentAsync method. E.g.
async Task OpenNewFeature(string[] scopes, AuthenticationResult acquireTokenByUsernamePasswordAuthenticationResult){
result = await app.AcquireTokenSilent(scopes, acquireTokenByUsernamePasswordAuthenticationResult.accounts.First())
.ExecuteAsync();
// ...
}
Later on, to easily (no brokers) leverage SSO between web applications you will need to interactively authenticate (not AcquireTokenByUsernamePassword
) and enable System Browser. Also, please take a look to the WAM Preview in MSAL 4.44+.
KMSI will also need interactive authentication.
Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.