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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 74 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 31 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans