by Netram Dhakar.
Hi Tomas,
As per my understanding Your webservice user don't have permision to assign role (Means your token don't have permission to assign role). please check the table "mdl_role_allow_assign". I think you need to do manual entry in this table.
For any more detial you can contact me at skype: netram.dhakar
Cheers
Netram Dhakar