UserManager<TUser>.FindByIdAsync(String) Method

Definition

Finds and returns a user, if any, who has the specified userId.

public:
 virtual System::Threading::Tasks::Task<TUser> ^ FindByIdAsync(System::String ^ userId);
public virtual System.Threading.Tasks.Task<TUser> FindByIdAsync (string userId);
public virtual System.Threading.Tasks.Task<TUser?> FindByIdAsync (string userId);
abstract member FindByIdAsync : string -> System.Threading.Tasks.Task<'User (requires 'User : null)>
override this.FindByIdAsync : string -> System.Threading.Tasks.Task<'User (requires 'User : null)>
Public Overridable Function FindByIdAsync (userId As String) As Task(Of TUser)

Parameters

userId
String

The user ID to search for.

Returns

Task<TUser>

The Task that represents the asynchronous operation, containing the user matching the specified userId if it exists.

Applies to