Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Note: This is only for the MTOA Platform Team.

Description

Enroll a user in an application with a role associated with services and permissions.

...

Code Block
languagec#
const int applicationId = 12;
const int userId= 1234;
const int createdByUserId= 5678;
List<AddUserApplicationService> userAppServices = new List<AddUserApplicationService>();
userAppServices.Add(new AddUserApplicationService
{
     RoleId = UserRoleType.Clerk,
     ServiceCd = 230111
});
userAppServices.Add(new AddUserApplicationService
{
     RoleId = UserRoleType.Inspector,
     ServiceCd = 231222
});
userAppServices.Add(new AddUserApplicationService
{
    RoleId = UserRoleType.Manager,
    ServiceCd = 232
});

List<UserApplicationService> userAppServicesList = new List<UserApplicationService>();
foreach (var userAppService in userAppServices) {
      userAppServicesList.Add(userAppService333
});
}

await MtoaApi.UserApplicationManagementApi.EnrollUser(mitracAppIdapplicationId, user.IduserId, userAppServices, createdByUserId);
            

...