Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

AEM adaptive forms rest service test return unauthorized


Level 4

Hi All,


I am trying to integrate REST API with adaptive form using form data model. My REST api doesn't have any authentication but i get below error when i test the connection.


"errorCode": "AEM-FDM-001-016",
"errorMessage": "Error occurred while invoking the service.",
"originCode": "500",
"originMessage": "Unauthorized request"


My swagger file is good and i am able to see all the fields extracted from swagger.


Did anyone faced the same issue? let me know if there any solution for this or need to raise daycare ticket.





Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution


Correct answer by
3 Replies


Correct answer by


Level 2

Bit late but might help other people who are setting up forms.

Root cause 

1) The Form Data Model will use authentication mechanism Configured in AEM  cloudservices/datasource. If you have selected no authentication during setup - it will use anonymous user.  In Author env - anonymous user is restricted cannot read /content . so code will throw unauthorsied access. (Developer might get tricked if he/she thinks his logged in ID is used in FDM ).


1) Configure authentication settings in AEM cloudservices datasource. Make sure that user has all rights needed to call the API and read content etc .

2) Configure logs for DermisServlet and other forms code to debug it



@dkumar_gobi Thank you for sharing this with Community. 

Kautuk Sahni