GetByEmail() [UserManager]

Get a user by email address

Description

The GetByEmail() method is used to get a user by email associated with the user.

Package Details

Interface

IUserManager

Syntax

await _userManager.GetByEmail(User user)

Returns

Task<ICollection<User>>

API

GET
/api/v1/users/emails?email={email}

Parameters

Parameter

Description

Parameter Type

Parameter

Description

Parameter Type

email

The email address of the user to be fetched

Query string

userType (optional)

Allow to filter users being queried by type. can be External, Guest, Internal, All (by default filter by UserType.External)

UserType enumeration

Returns

On success, 200 Ok

If UserManage.GetByEmail() returns null, 422 Unprocessable Entity

On error, 400 Bad Request

On authorization error, 403 Forbidden

Example

string emailAddress = "domain@domain.com"; await _userManager.GetByEmail(emailAddress);