How to get all Security roles of User based on Userid in Javascript
*This post is locked for comments
Announcements
How to get all Security roles of User based on Userid in Javascript
*This post is locked for comments
Just curious - isn't it possible to use OData instead? I believe it's possible and much more easier - community.dynamics.com/.../204295
Additionally If you wish to get the Role Ids of Current Logged in user, you can get it using Xrm.Page.context.getUserRoles().
Hi Akash,
In order to retrieve the security roles in JScript you have to make a SOAP request.
In the next link you may find how to perform a SOAP request for a Retrieve Multiple. In your case, you only have to replace the query fetchXml in the request, by the fetchXml to get all secutity roles that a user is part of.
mileyja.blogspot.pt/.../use-fetchxml-queries-in-jscript-and-net.html
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
dkrishna
6