Delete user accounts

You can delete multiple user accounts on the BlackBerry® Enterprise Server using the deleteUsers() method. To delete one user account, you can use the deleteUser() method instead.
Before you begin: Retrieve the userIDs integer array for the IDs of the user accounts that you want to delete.
  1. Invoke deleteUsers().
    deleteUsers deleteRequest = new deleteUsers();
    deleteRequest.userIds = userIDs; 
    deleteUsersResponse deleteResponse = coreWebService.deleteUsers(deleteRequest);
    DeleteUsersResult result = deleteResponse.returnValue;
  2. Check the result for errors and handle any errors.
    if(result.deleteUsersReturnStatus.code != DeleteUserReturnStatusEnumType.SUCCESS ) 
           // handle any errors
Previous topic: Create a user account

Was this information helpful? Send us your comments.