Assignments in Teams for Education can still show data for students who are no longer enrolled in the class. Even after a student is removed from the class team (and thus from the Class Notebook membership), their assignment data can remain associated with the class as “no longer enrolled.” This is why the name can still appear in assignment targeting.
To fully clean this up, a tenant admin can bulk export or delete assignment data for that student from the class:
- Before (or even after) removing the student from the class, the admin runs the Assignments script described in Configure assignments for Teams, providing the student’s
userId and, optionally, the classId.
- To remove the student’s assignment data from a specific class, the admin uses the bulk delete option with both
userId and classId. This deletes the student’s assignment data for that class outside of the SharePoint document libraries.
- Once the student’s assignment data is deleted for that class, the student should no longer appear as a target when creating new assignments.
If the student was originally part of the class team and then removed, but their assignment data still needs to be exported (for records) before deletion, the admin can:
- Add the student back to the class temporarily (if possible) and run the script with
userId, or
- Run the script with
userId and classId even if the student has already been removed from the site.
Because this involves tenant-level scripts and access to userId/classId, this cleanup must be done by the Microsoft 365/Azure AD (Entra ID) admin, not from within the Teams Assignments UI alone.
References: