by Hajo Emch.
If I enrol my service user to the course and give him the permission 'Allow role assignments' then it works.
But I dont want to enrol my service user! Is there a way to enrol students, without enroling the service user?
Thanks for help