-
Notifications
You must be signed in to change notification settings - Fork 37
Description
I am doing the following steps
- Execute this code
var authResult1 = await app.AcquireTokenInteractive(App.ApiScopesBasic)
.WithUseEmbeddedWebView(false)
.WithParentActivityOrWindow(new WindowInteropHelper(this).Handle)
.ExecuteAsync();
which is in the SignInButton_Click
code of this sample.
an id token is returned, which includes several claims including for example the user's first name - which right now is "name1".
-
After the above call is done, I manually update the information of the user in the azure portal (eg. update the first name from "name1" to be "name2"). In reality, I would not update the user's info in the portal but I could have some other application updating the user's information using graph API while the user still has a valid refresh token.
-
Do this call
var authResult2 = await app.AcquireTokenSilent(App.ApiScopesBasic, accounts.FirstOrDefault())
.WithForceRefresh(true)
.ExecuteAsync();
in the id token of this auth result, I still get the "name1" as in the call of step 1 (instead of the "name2" as updated in step 2). If instead of acquiring the token silently, I do an interactive one then I will get the correct name.
Is the .WithForceRefresh(true)
not enough? How can I force get the user's latest information without requiring user interaction?
thanks