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.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for