UserManager<TUser>.FindByIdAsync(String) 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.
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.