Purge a user and user's data via the API

Besides removing a user from a course catalog when their records are still preserved in the system and in the Transcript, it's also possible to purge a user with all their data from the Learn365 tenant, therefore completely removing the enrollment registrations, training progress and records of actions. This purge can be done using the Purge User's Records option in the Learn365 Admin Center or the Learn365 API.

 

NOTE   

You can purge the data from both Learn365 and Flow365 user accounts.

 

This article shows the steps you should follow to purge a user's data from Learn365 via the API.

 

To purge a user and their data from Learn365, follow these steps:

1. Go to https://api.365.systems/ and make sure you are authorized with the relevant API key.

 

2. Find and expand the Users section, find POST /odata/v2/ Users('{LoginName}')/Purge with the Purge user's data description, and then select Try it out in the top right-hand corner.

 

 

3. After selecting Try it out, two fields will be displayed.

Complete the required parameter—key: LoginName, where you need to enter the login name of the user you want to remove from Learn365.

 

 

NOTE   

If there are several users with the same login name, the purge request will fail with the 500 error because the system can't identify the user. We recommend you use DirectoryObjectId instead of LoginName because DirectoryObjectId is a unique identifier in Azure Active Directory for each object. It remains unchanged and helps the system to identify the user. The DirectoryObjectId is found in the same response as the login name.

 

4. When you are ready, select Execute to run the request. 

 

5. Go to the Responses block to check the results:

  • Number 2xx (e.g. 202) under Code shows that the request worked correctly.
  • In the Response body field, you will see the results of the purge request. The user, as well as all the user's data (including enrollment registrations, training progress and actions records) will be completely deleted from the Learn365 tenant, from all its course catalogs, courses and training plans. The user and all their records will be completely removed from all the Users lists of all of course catalogs of the tenant and it won't be possible to restore the records. 

NOTE   

If a user was added via an Azure AD group to a course or course catalog, the user will later reappear in the Users list of the course catalog but with no training records.

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

Article is closed for comments.