Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8896183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:58:28+00:00 2026-06-14T23:58:28+00:00

I want to access Security duties (in code), but I don’t know where they

  • 0

I want to access Security duties (in code), but I don’t know where they are stored (in which table)?

Privileges are stored in SecurityTask, now I need to know where duties are stored in AX 2012.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:58:29+00:00Added an answer on June 14, 2026 at 11:58 pm

    I found it here: http://arsalanax.blogspot.be/2012/02/role-based-security-in-ax.html

    Roles are stored in SecurityRole

    User to role mappings in SecurityUserRole

    Duties & privileges stored in SecurityTask

    Duty to privileges mappings are stored in SecuritySubTask

    Role to duty mappings are stored in SecurityRoleTaskGrant

    UPDATE (query added)

    SecurityTaskEntryPoint  taskEntryPoint;
    SecurityRole            role;
    SecurityRoleTaskGrant   taskGrant;
    SecuritySubTask         subTask;
    SecurityTask            privilege;
    str privName;
    str dutyName;
    str entrName;
    str accessLevel;
    ;
    
    while select taskEntryPoint
    join subTask
        where subTask.SecuritySubTask == taskEntryPoint.SecurityTask
    join taskGrant
        where taskGrant.SecurityTask == subTask.SecurityTask
    join role
        where role.RecId == taskGrant.SecurityRole
        &&  role.AotName like 'Sales*'
        //|| role.AotName like 'System*'
    {
         if (subTask.RecId)
        {
            switch (taskEntryPoint.PermissionGroup)
            {
                case AccessRight::View:
                    accessLevel = "R";
                    break;
                case AccessRight::Edit:
                    accessLevel = "U";
                    break;
                case AccessRight::Add:
                    accessLevel = "C";
                    break;
                case AccessRight::Delete:
                    accessLevel = "D";
                    break;
                default:
                    accessLevel = "";
                    break;
            }
        }
    
        select privilege
            where privilege.RecId == taskGrant.SecurityTask
            && SecurityTaskType::Duty == privilege.Type;
        dutyName = privilege.AotName;
    
        select privilege
            where privilege.RecId == subTask.SecuritySubTask
            && SecurityTaskType::Privilege == privilege.Type;
        privName = privilege.AotName;
    
        info(strFmt("EP: %1, Pr: '%2', Du: %3, Ro: %4, Ac: %5", taskEntryPoint.EntryPoint, privName, dutyName, role.AotName, accessLevel));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use code access security and add code modify group. but I
see also Is Code Access Security of any real world use? I want to
I want to access camera to record video to upload, but have come across
I want to access the following path on Ubuntu in my python code: ~/.mozilla/firefox/dh4ytbdj.default/bookmarkbackups
I want to access java script's return value , which in is in a
I want to access the session variable which I declared in the another php
A have a web-accessible (via basicHttpBinding) WCF service which I also want to access
I want to access EJBs with security.. I am developing an eclipse rcp application
I want to Access Information of Builds of Team Projects to use them in
I want to access text-shadow property just like we access padding property. Means ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.