Deleting Users

For deleting a User or multiple Users in Itslearning, only the SyncKey of that User is needed. With this SyncKey you can use the following functions:

DeleteUser

This function deletes the given user from Itslearning. This user will appear in the trash can, and will only be able to be removed after the quarantine period is over. When you create or update a user with the same sync key, the deleted user will be restored again.

Syntax:

OperationResult warning = ImsEsClient.DeleteUser(string syncKey);

Parameters:

syncKey:

The key of the user to be deleted.

Returns:

The OperationResult containing the warning that Itslearning has send back, or if there was none, null.

Exceptions:

  • ImsEsException: If IMS-ES encountered an error in Itslearning, this exception will be thrown.

DeleteUsers

This function deletes the given users from Itslearning. These users will appear in the trashcan, and will only be able to be removed after the quarantine period is over. When you create or update a user with the same sync key, the deleted user will be restored again.

Syntax:

BatchOperationResult warning = ImsEsClient.DeleteUsers(ICollection<string> syncKeys);

Parameters:

syncKey:

The keys of the users to be deleted.

Returns:

A BatchOperationResult with the list of warnings that Itslearning has send back (this list can be empty).

Exceptions:

  • ImsEsBatchException: If IMS-ES encountered an error in Itslearning, this exception will be thrown.