Note: This is only for the MTOA Platform Team.
Description
Enroll a user in an application with a role associated with services and permissions.Retrieve internal users based on an application id
Package Details
Interface
Code Block |
---|
IUserApplicationManagementManager |
...
Code Block |
---|
await UserApplicationManagementManager.EnrollUserGetUsersByApplicationId(int appId, int userId? page = null, int? pageSize = null, string userName = "", string emailAddress = "", UserRoleType? roleId,userRoleType int= createdByUserIdnull, int? organizationIdservId = null); |
Returns
Code Block |
---|
voidUserApplicationInfoResult |
API
POST GET - /api/v1/userapplications/{id}/enrolluserusers
Parameters
Parameter | Description | Type | |
---|---|---|---|
idappId | The identification number of the application. | Path | |
userIdpage | The identification number of the userpage number. Optional. If it is empty, the default value is 1 | Query string | |
pageSize | size of the page. Optional. If it is empty, the default value is the MTOA max page size (100). | Query string | |
userName | Optional. If it is entered, it will search users whose first name or last name that contains the value. Note: If email address and name are entered, it will search users that have the email address or the user name. | Query string | |
roleId | UserRoleTypeemailAddress | Optional. If it is entered, it will search email address that contains the value. Note: If email address and name are entered, it will search users that have the email address or the user name. | Query string |
organizationId | Organization id defaulted to nullUserRoleType | Optional. User role code. If it is entered, the result will be filtered by the role. It will search users with the role. | Query string |
createdByUserId | The identification number of the user who is adding this userServId | Optional. Service Id. If it is entered, it will be filtered by the service id. It will search users that have access to the service. | Query string |
Returns
HTTP 200 - OK
...
Code Block |
---|
const int applicationId = 12; const int userId= 1234; const UserRoleType userRoleType = UserRoleType.InvoiceManager; const int createdByUserId= 5678; await _userApplicationManagementManager.EnrollUserGetUsersByApplicationId(applicationId, userId1, userRoleType, createdByUserId20); |