by We Be.
If found a solution with the API-Call : core_role_assign_roles
roleid=...
userid=...
contextlevel ="coursecat";
intanceid = categoryid;
thanks