Unenroll a user/group from courses or training plans via API

LMS365 (Learn365) allows unenrolling users and Microsoft Entra (Azure Active Directory) groups from courses and training plans in the Learn365 Admin Center or via the LMS365 (Learn365) API. This article describes what the APIs to use and steps to perform to unenroll a user/group from an LMS365 (Learn365) course or training plan.


To unenroll a user or a group from a course or training plan, follow the steps below:

1. Navigate to https:/api.365.systems/ and authorize with the relevant API key. You can find more about the authorization process here.


2. In the list of LMS365 (Learn365) API sections, find the Courses section, expand it, find the POST /odata/v2/Courses({Id})/Unenroll endpoint with the Unenrolls user or group from a Course description and click Try it out.



3. After you select Try it out, two fields will appear which are required to fill in:

  • key:Id where you need to enter the ID of the course or training plan you want to unenroll a user or a group from, and 
  • Edit Value where "userLoginName": "string" you need to replace the string with the login name of a user/group you want to unenroll. 





The text provided in the "message": "string" line will be displayed as the cancellation message in the Learn365 Admin Center. If this line is left unchanged or is deleted, the cancellation message will consist of three dashes.


4. Select the Execute button to run the request.


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

  • Number 2xx (for example, 204) under Code shows that the request worked correctly.
  • In the Response header field you will see the results of the request. For example, in the "date" line, you can find the date and time of the user's/group's unenrollment.
  • The user/group will be unenrolled from the course/training plan and the unenrolled users/groups will receive a corresponding cancellation notification. You can confirm the user/group unenrollment via Learn365 Admin Center > select the relevant training > Manage People > check the list of enrolled users/groups.


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


Article is closed for comments.