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, ...
Suggested Answer

Access denied Issue in AIF services and Batch job for system Administrator

(0) ShareShare
ReportReport
Posted on by 10

Hi,

For past few days we are facing Access denied Issue for most of our custom AIF services and few batch job for system administrator.

As we have 6 AOS (2 for Batch jobs, 2 for client, and 2 for Services). We get this error in random manner. Sometimes only in few servers. When we point the services or batch to alternate cluster AOS, it works fine( sometimes).

We did AXbuild compile, Full CIL, Sync. Deleted XppIl folder and also AIF Service form Refresh.

But this issue happens mostly after AOS restart.

Version:

AX 2012 R3 CU13.

Error in AIF service: "Access denied to method read in class <ClassName>".

Error In Batch job: "Access denied: SysOperationServiceController"

But we have added the code permissions and the user is system administrator.

Kindly Suggest us how to fix this issue.

Regards,

Muhil

I have the same question (0)
  • udaY-ch Profile Picture
    5,133 on at

    Hi,

    Error in batch mode.

    As you can see, this is the code being used to check access for the job runs in the batch job mode.

    SysOperationServiceController\CheckAccess

    public void checkAccess()

    {

       SecurityRights rights;

       DictMethod dictMethod;

       // get service operation will validate className and methodName

       dictMethod = this.getServiceOperation();

       if (dictMethod)

       {

           rights = SecurityRights::construct();

           if (rights.hasServerMethodAccess(className, methodName))

           {

               return;

           }

       }

       // super throws an access denied exception

       super();

    }

    This method has to hit return else it gonna throw an error when it made to the super() call.

    So, there are two chances likely to get an error here.

    1. If dictMethod, getServiceOperation returns null.

    2. If user has no rights. You mentioned, The user has System administrator rights.

    If rights isn't the issue then I would say, system cannot find the service class and its entry point which could also lead to an error.

    Uday

  • Suggested answer
    TracyXing Profile Picture
    on at

    For the Error in AIF service: "Access denied to method read in class <ClassName>", please try this link: https://axtechbirchendale.wordpress.com/2016/05/17/ax-2012-access-denied-to-method-within-class/

  • Dyanamics Ax 2012 Access denied Issue for system Adminstrator Profile Picture
    10 on at

    If it is for other role I would have added it. But I am facing this issue for system admin.

  • Suggested answer
    TracyXing Profile Picture
    on at

    From code:

    public void checkAccess()

    {

       SecurityRights rights;

       DictMethod dictMethod;

       // get service operation will validate className and methodName

       dictMethod = this.getServiceOperation();

       if (dictMethod)

       {

           rights = SecurityRights::construct();

           if (rights.hasServerMethodAccess(className, methodName))

           {

               return;

           }

       }

       // super throws an access denied exception

       super();

    }

    Suggest to debug this code and check which right it used and find the right in AOT and add the missing method to server method

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