How do we get that?, I know positive that u can but it is for publisher or administrator privileges.
Get Roles—ArcGIS REST API: Administer your server | ArcGIS for Developers
I mean how can afford it but with a user with no privileges than need to know his own role. Thanks in advance.
Thanks to Jorge Barrachina Gutiérrez to answer me this question. I show u to share it:
https://<agol-server>/sharing/rest/community/self
With that whoever user can get his/her own roleid.