UserManager<TUser>.GetUserAsync(ClaimsPrincipal) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the user corresponding to the IdentityOptions.ClaimsIdentity.UserIdClaimType claim in the principal or null.
public:
virtual System::Threading::Tasks::Task<TUser> ^ GetUserAsync(System::Security::Claims::ClaimsPrincipal ^ principal);
public virtual System.Threading.Tasks.Task<TUser> GetUserAsync (System.Security.Claims.ClaimsPrincipal principal);
public virtual System.Threading.Tasks.Task<TUser?> GetUserAsync (System.Security.Claims.ClaimsPrincipal principal);
abstract member GetUserAsync : System.Security.Claims.ClaimsPrincipal -> System.Threading.Tasks.Task<'User (requires 'User : null)>
override this.GetUserAsync : System.Security.Claims.ClaimsPrincipal -> System.Threading.Tasks.Task<'User (requires 'User : null)>
Public Overridable Function GetUserAsync (principal As ClaimsPrincipal) As Task(Of TUser)
Parameters
- principal
- ClaimsPrincipal
The principal which contains the user id claim.
Returns
Task<TUser>
The user corresponding to the IdentityOptions.ClaimsIdentity.UserIdClaimType claim in the principal or null