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

Security Role list

(2) ShareShare
ReportReport
Posted on by 8

Where can I find a list of the default security roles in D365 F&O?  My new company and their support partner created custom roles with no agreed-on naming convention.  I can't tell the default from the custom without doing a ton of work.  I have looked in the Security area in the system and can't find a list or way to easily identify a default role.  I was thinking maybe the SECURITYROLEIDENTIFIER?  Some of the roles that I suspect are custom start with numbers, but not all of them.  Any ideas?

Thanks

Categories:
  • Subra Profile Picture
    2,244 Super User 2026 Season 2 on at

    Hi @TD-19081752-0 

    In the below navigation you can find all the security configuration. If you have any naming convention for your customization you can filter that.

     





     

    Thanks,
    Subra

    If this helped, please mark it as "Verified" for others facing the same issue
  • Suggested answer
    Assisted by AI
    SajeedMullaji Profile Picture
    858 on at

    there is no native flag in the UI or a SECURITYROLEIDENTIFIER column that explicitly labels a role as standard versus custom — the Security roles list merges both without visual distinction. The reliable way to separate them is by checking which model the role belongs to in the application metadata.

    Method 1 — SQL query against model metadata (most reliable)

    SELECT

        r.NAME AS RoleName,

        r.LABEL AS RoleLabel,

        m.NAME AS ModelName,

        CASE

            WHEN m.NAME IN ('ApplicationSuite', 'Foundation', 'Platform', 'Organization', 'Directory')

            THEN ‘Standard Microsoft’

            ELSE ‘Custom / Partner’

        END AS RoleClassification

    FROM SECURITYROLEDETAIL r

    JOIN MODELMANIFEST m ON r.MODELID = m.ID

    Standard Microsoft roles sit in ApplicationSuite, Foundation, Platform, Organization, or Directory models. Anything else is custom or partner-built.

    Method 2 — Visual Studio Application Explorer (if you have dev access)

    Navigate to Security > Security Roles in Application Explorer. Check the Model property on each role — ApplicationSuite or Foundation means standard Microsoft, your custom model name means custom.

    Method 3 — Security Configuration form

    Roles created dynamically via System administration > Security > Security configuration sit in application data tables rather than metadata packages. Check the Roles tab — roles created here will often show unpublished changes or sit outside standard metadata.

    Method 1 gives you the cleanest exportable list in one run.

     

    It it helps mark as verified.

  • Suggested answer
    Aayush Tiwari Profile Picture
    384 on at

    Hello @TD-19081752-0 

    If you want to identify the Custom roles created just export in excel all the roles from your environment as per the path mentioned by @Subra  (System Administration  > Security > Security Configuration) and the do the same from any other environment and perform a VLOOKUP function to identify the roles created by the user in your environment.

     

    Regards

    Aayush Tiwari

  • Suggested answer
    Navneeth Nagrajan Profile Picture
    2,699 Super User 2026 Season 2 on at

    Hi @TD-19081752-0,

    The observation about SecurityRoleIdentifier(and related fields) is correct. In the Security role table, standard roles have an Application Object Tree (AOT) name. Critical tables to be considered are SecurityObjectChildReferences, SecurityRole, SecurityDuty, SecurityRoleDutyExplodedGraph, SecurityUserRole etc.

    You can use this SQL Query. We just shared this with the customer for licensing revamp and this query works. 
    Security Roles, Duties and Privileges extract with user ids:
    1. SELECT DISTINCT -- top 1000
       u.ID,
       u.Name AS UserName,
       sr.Name AS SecurityRole,
       --sr.Identifier AS RoleAOTName,
       sd.Name AS Duty,
       sd.Identifier AS DutyAOTName,
       sp.Name AS Privilege,
       sp.Identifier AS PrivilegeAOTName
    FROM SecurityUserRole sur --Security Roles associated with user
    JOIN UserInfo u ON u.Id = sur.User_
    JOIN SecurityRole sr ON sr.RecId = sur.SecurityRole
    --- Roles associated with Duties
    JOIN SECURITYROLEDUTYEXPLODEDGRAPH srd ON srd.SecurityRole = sr.RecId. 
    JOIN SecurityDuty sd ON sd.RecId = srd.SecurityDuty
    JOIN SECURITYOBJECTCHILDREREFERENCES soc ON soc.Identifier = sd.Identifier
    — Privileges associated with Duties, Roles, User-Ids
    JOIN SecurityPrivilege sp ON sp.Identifier = soc.ChildIdentifier
    WHERE sur.AssignmentStatus = 1
     AND soc.ObjectType = 1 AND soc.ChildObjectType = 2
    ORDER BY 
    u.ID,
    sr.Name, sd.Name, sp.Name;

    2. Without users if you are looking to extract the list of roles, duties and privileges. 
    SELECT 
       T2.Name AS SecurityRole,
       --T2.Identifier AS RoleAOTName,
       T3.Name AS Duty,
       T3.Identifier AS DutyAOTName,
       T5.Name AS Privilege,
       T5.Identifier AS PrivilegeAOTName
    FROM SECURITYOBJECTCHILDREREFERENCES T1
    JOIN SecurityRole T2 ON T1.Identifier = T2.AOTName
    JOIN SecurityDuty T3 ON T1.ChildIdentifier = T3.Identifier
    JOIN SECURITYOBJECTCHILDREREFERENCES T4 ON T4.Identifier = T3.Identifier
    JOIN SecurityPrivilege T5 ON T4.ChildIdentifier = T5.Identifier
    WHERE T1.ObjectType = 0 AND T1.ChildObjectType = 1     -- Role to Duty
     AND T4.ObjectType = 1 AND T4.ChildObjectType = 2     -- Duty to Privilege
    ORDER BY T2.Name, T3.Name, T5.Name;

    We can use these queries as the base to extract the list of users associated with duties, privileges and the relevant access levels through a X++ script. 

    Ensure that custom roles are created through Visual studio because these roles will have proper AOT names (prefixed with the company name). Roles created from UI are stored as data and these identifiers are auto-generated rather than clean AOT Names.
     

    References:
    https://learn.microsoft.com/en-us/dynamics365/guidance/implementation-guide/security-strategy-product-oa

     

    Hope this helps. Happy to answer questions, if any.

     

  • TD-19081752-0 Profile Picture
    8 on at

    @Navneeth Nagrajan ,

    Thanks for your information.  I'm unclear on how the results of the queries you shared will indicate what is a custom role/duty/privilege versus standard/out of the box.  The custom roles contain data in the AOT field.  Can you clarify please?

    Thanks!

     

  • Suggested answer
    Navneeth Nagrajan Profile Picture
    2,699 Super User 2026 Season 2 on at

    Hi @TD-19081752-0,

    Modified the query to include the table SystemSecurityRoleCustomizationsEntity. This should give you the list of custom roles. 
    SELECT DISTINCT 
      u.ID,
      u.Name AS UserName,
      sr.Name AS SecurityRole,
      ----sr.Identifier AS RoleAOTName,
      --sd.Name AS Duty,
      --sd.Identifier AS DutyAOTName,
      --sp.Name AS Privilege,
      --sp.Identifier AS PrivilegeAOTName
      --,
      CASE WHEN ssrc.IDENTIFIER IS NOT NULL THEN 'Custom' ELSE 'Standard' END AS SourceType
      --,CASE WHEN scdo.DATA IS NOT NULL THEN 'Custom' ELSE 'Standard' END AS SourceType
      --,CASE WHEN scpo.DATA IS NOT NULL THEN 'Custom' ELSE 'Standard' END AS SourceType
    FROM SecurityUserRole sur --Security Roles associated with user
    JOIN UserInfo u ON u.Id = sur.User_
    JOIN SecurityRole sr ON sr.RecId = sur.SecurityRole
    --- Roles associated with Duties
    JOIN SECURITYROLEDUTYEXPLODEDGRAPH srd ON srd.SecurityRole = sr.RecId 
    JOIN SecurityDuty sd ON sd.RecId = srd.SecurityDuty
    JOIN SECURITYOBJECTCHILDREREFERENCES soc ON soc.Identifier = sd.Identifier
    --- Privileges associated with Duties, Roles, User-Ids
    JOIN SecurityPrivilege sp ON sp.Identifier = soc.ChildIdentifier
    --Custom or standard roles
    ---Alternatively you can use SecurityRoleCustomizeDiskObject
    JOIN SYSTEMSECURITYROLECUSTOMIZATIONSENTITY ssrc 
    on ssrc.IDENTIFIER = sr.AOTNAME
    ----- Custom or standard duty
    ---JOIN SECURITYDUTYCUSTOMIZEDISKOBJECT scdo on scdo.IDENTIFIER = sd.IDENTIFIER
    ----- Custom or standard privilege
    --JOIN SECURITYPRIVILEGECUSTOMIZEDISKOBJECT scpo on scpo.IDENTIFIER = sp.IDENTIFIER

    WHERE sur.AssignmentStatus = 1
    AND soc.ObjectType = 1 AND soc.ChildObjectType = 2
    ORDER BY 
    u.ID,
    sr.Name
    --, sd.Name, sp.Name;

    Tested this query and it provides the list of custom roles. In addition to this, to find the list of custom duties and privileges explicitly associated with the custom roles, I have commented out the code for re-usability.

    Hope this helps. Happy to answer questions, if any.

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 366

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 360 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans