You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public Task<ClaimsPrincipal?> GetAuthenticatedUserAsync(ClaimsPrincipal? user)
{
return Task.FromResult<ClaimsPrincipal?>(HttpContext.Current.User as ClaimsPrincipal);
}
This code ignores the passed ClaimsPrincipal user. So if you where to manually resolve the ITokenAquirer as depicted in various example apps, and pass along a user when calling for example GetTokenForUserAsync it will never use the user you provided.
Reproduction steps
Initialise microsoft.identity.web using the OwinTokenAcquirerFactory.
Microsoft.Identity.Web Library
Microsoft.Identity.Web.OWIN
Microsoft.Identity.Web version
2.15.1
Web app
Not Applicable
Web API
Not Applicable
Token cache serialization
Not Applicable
Description
https://github.com/AzureAD/microsoft-identity-web/blob/efd1dec1f49cac8a7e7e4c821478c1af95cbc758/src/Microsoft.Identity.Web.OWIN/OwinTokenAcquisitionHost.cs#L35C1-L38C10
This code ignores the passed ClaimsPrincipal user. So if you where to manually resolve the
ITokenAquirer
as depicted in various example apps, and pass along a user when calling for exampleGetTokenForUserAsync
it will never use the user you provided.Reproduction steps
Note that the loggedin user is used in the background, and not the user you provided.
Error message
No response
Id Web logs
No response
Relevant code snippets
Regression
No response
Expected behavior
I Expect the
OwinTokenAcquisitionHost
to respect the claimsprincipal thats passed alongThe text was updated successfully, but these errors were encountered: