web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Get user permissions for an Entity Via javascript

(0) ShareShare
ReportReport
Posted on by 4

I have an HTML page that appears on my contact form.

It is a custom entity that not everyone with the ability to open contact have permission to.

What I need to do is on page load check that the current user has at least read permissions to the custom entity and if they do load the HTML.

If they don't then leave the HTML off the page.

I know there is a function in Power Apps for this, but I am still using legacy forms and will be for a while. Too much customization to change.

I cannot believe I am the first to need this functionality.

Thanks Brian

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    This is how you can do it - learn.microsoft.com/.../usersettings

  • CU02122005-1 Profile Picture
    4 on at

    That gives me the Role for the current user, but I need to know whether or not a user has minimum read access for a specific entity.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Please, review the document. This is exactly what you need:

    pastedimage1669755574430v1.png

    The other thing that you will have to dig to the particular privilege but that's what you need. Good luck.

  • CU02122005-1 Profile Picture
    4 on at

    This does not work in my environment. I am using legacy forms not the Power Apps forms.

    userSettings.getSecurityRolePrivilegesInfo().then(successCallback, errorCallback);

    Tells me getSecurityRolePrivlegesinfo is not a function.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    In this case, I would recommend using WebApi to query that data and check the level of privileges.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 55 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 37

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans