My application is based on this example I'm receiving token in my wpf application form login and password like this:
result = await _app.AcquireTokenByUsernamePasswordAsync(Scopes, username, securePassword);
then I want to access to my secured web api. But when I try to access I get
AADSTS70002: Error validating credentials. AADSTS500137: The token issuer doesn't match the api version: A version 1 token cannot be used with the v2 endpoint. Trace ID: 42aaa5f8-0a2c-4c3f-a593-1676fd662700 Correlation ID: efe97d3a-ca2f-4dfe-a50c-5c3f4accde9a Timestamp: 2019-01-20 15:52:16Z
here
AuthenticationResult result = application.AcquireTokenOnBehalfOfAsync(scopes.Except(_scopesRequestedByMsalNet), userAssertion).GetAwaiter().GetResult();
What I just found out is that AcquireTokenOnBehalfOfAsync gives v1 or v2 for different registered native applications. I cannot find the difference in configurations on azure between the 2 apps.