GetByOrganization() [UserManager]

Get a list of users by organization

Description

The GetByOrganization() method is used to get a list of users associated with an organization

Package Details

Interface

IUserManager

Syntax

await _userManager.GetByOrganization(int organizationId, int? serviceId)

Returns

Task<ICollection<User>>

API

GET
/api/v1/organizations/{id}/users

Parameters

Parameter

Description

Parameter Type

Parameter

Description

Parameter Type

organizationId

The organization Id to search for

Integer

serviceId (optional)

TC service id

Integer

Returns

On success, 200 Ok

On error, 400 Bad Request

On authorization error, 403 Forbidden

Example

int organizationId = 2267; var users = await userManager.GetByOrganization(organizationId);