Skip to main content
Dynamics 365 general forum
Suggested answer

rest api to get security roles on a record

editSubscribe (0) ShareShare
Posted on by 30
Is there a REST API to get all the security roles on a record? I want to see all the security roles which are currently active on a record from any entity.
  • Suggested answer
    RudyZhang Profile Picture
    RudyZhang on at
    rest api to get security roles on a record
    Our team analyzed your requirements, and according to the official Microsoft documentation, you can use the /Xrm.Utility.getGlobalContext().userSettings. roles/ method to get a collection of lookup objects that contain the GUID and display name of each security role assigned to the user, as well as to the team associated with the user's any security roles assigned to the user's associated team.

    As you use it, please note that this method is only supported on the Unified interface.
    The documentation is linked below
    In addition, the article at the following link has a simple sample code that will help you better understand and use this API.
    I hope my answer is helpful to you! If you have any other questions, please feel free to contact me.
    Best Regards,
    Rudy Zhang

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,066 Super User

Martin Dráb Profile Picture

Martin Dráb 222,585 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans