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 :
Finance | Project Operations, Human Resources, ...
Answered

Get the list of legal entities of a User

(0) ShareShare
ReportReport
Posted on by 230

Hi All,

I need to find out the list of legal entites a User is having access to.

There is a chance of the user having multiple roles and also for each role it can have either specifc companies or all or have Organization hierarchy assigned,

Please suggest.

Thanks

Krishnendu

I have the same question (0)
  • Suggested answer
    Ramit Paul Profile Picture
    22,797 Most Valuable Professional on at

    You can use SystemSecurityUserRoleOrganizationEntity data entity to get this list.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Krishnendu,

    The table UserDataAreaList is having a list of companies per user. There are also options to retrieve the list with selectable entities via coding.

            SecurityRights rights = SecurityRights::construct();
    
            container companies = rights.getSelectableCompanies();

    Can you tell what you want to achieve? Then we can suggest the best option for you. Note that the System user role is not restricted and would cause providing a list with all legal entities.

  • Krishnendu Profile Picture
    230 on at

    Hi Andre,

    I think the table your are are talking is UserDataAreaFilter and yes it contains all the legal entities.

    We have a crosscompany upload functionality where we have a company column based on which we update some tables.  If the user who is uploading doesn't have access it should throw error. Also the error log will have list of errored records so user with specific access to legal entities should be able to see the records.

    SecurityRights rights = SecurityRights::newUser(userId);

    container companies = rights.getSelectableCompanies();

    this works but I noticed one thing if we provide any organization hierarchy and grant it to a user it doesn't add those legalentites ...

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Krishnendu,

    My bad, I intended to share indeed the table name UserDataAreaFilter.

    Did you add the organization hierarchy to a user via a security role? If so, ensure the security will be reloaded. Most simple for testing is closing the internet browser with the Dynamics 365 session and start a new session.

  • Krishnendu Profile Picture
    230 on at

    Andre...yes thanks ...it worked after starting a new session...also for both the tables SECURITYUSERROLE & SecurityUserRoleCondition the values updated after starting a new session.

    Thanks

    Krishnendu

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans