Search This Blog

Wednesday, November 15, 2017

AIF (Endpoint) Error : The user is not authorized to perform this action.


"The user is not authorized to perform this action." 
We started getting this error message in our AX 2009 System, when ever we try to consume an XML file using an Endpoint  thru a File System Channel to create a Sales Order.
We did not made any code changes / setup changes, but all of the sudden started getting this error.

Solutions :
1. Validate the "SourceEndpointUser". in inbound XML 
The User ID should be a valid user Id in DAX, in GNS Active Directory and the "\" should be back slash in the XML file or where you use this combination in entire process or setup. ex : Domain \ User Id.
In our case when we had the above error, the SourceEndPointUser user id was deleted from the Active Directory in GNS, so we added it back to Active Directory then it solved the problem.
NOTE : If nothing wrong with the User ID, try to add the user id in "Users" tab in Endpoints form for that End Point used by the process.
2. Verify the field "Parallel processing" in File System Channel is unchecked.
Basic --> Setup --> AIF --> Channels
We may get the above error if the "Parallel processing" field is set to TRUE(Checked).
3. Try to modify the code in C \ AifInboundParallelMsgProcess\Methods\run ( ).

The code is valid "inboundMsgProcess = new AifInboundMsgProcess(gatewayQueue.data(),
resourceLockId);"
Change From :
"inboundMsgProcess = new AifInboundMsgProcess(gatewayQueue.data(),
resourceLockId);"
Change to :
"inboundMsgProcess = new AifInboundMsgProcess(gatewayQueue,
resourceLockId);"
Hope one of the solutions might work for your issue.
DISCLAIMER This is only an advice to fix this issue, but try this at your own risk.
Happy DAXing
Sai