I wanted to know if it was possible to get the roles of a user via the webservice. I haven’t found any endpoints to do that, and the only answers told me to go through the database, but I don’t have access to it.
Is there a way to do that?
Thank you and have a nice day !
in my opinion there is no such webservice. What do you want to achieve? Maybe there is another way to do that.
I don’t know if there’s any other way to do that.
Thanks again for your time.
I am sorry, but you still keep saying the same things like in the german forum. As I said, there is no webservice to get the roles of a user. But if you'd tell us what do you want to do, maybe there is an alternative way to achieve your goal.
If you want to get all users from course for example you maybe can use the webservice function: "core_enrol_get_enrolled_users_with_capability". By naming the capability you could differ between students and teachers.
The problem with roles is that they can be changed without to inform the external system. Capabilities for example always are the same.