401 error when using local dev token in AEM Forms as a Cloud Service
When using a local development token from Adobe Developer Console (ADC) in AEM Forms as a Cloud Service, a 401 error occurs due to insufficient access rights. To fix this, create a Technical Account in AEM Developer Console, generate an access token using its credentials, and assign the required permissions to enable API calls.
Description description
Environment
Adobe Experience Manager as a Cloud Service (AEMaaCS) – Forms
Issue/Symptoms
- Submitting a local development bearer token from Adobe Developer Console in Environment Configuration results in a 401 error.
- Credentials created from ADC don’t work for AEM Forms API calls.
- The technical account set for the ADC project doesn’t exist under AEM.
Resolution resolution
Note: Credentials from Adobe Developer Console don’t work for AEM Forms API calls. These credentials only allow access to Cloud Manager tasks, not AEM instances. The Technical Account linked to the Developer Console project doesn’t exist in AEM, so it can’t make API calls.
To resolve this issue, follow these steps:
-
Use the AEM Developer Console to create a Technical Account. Copy the client ID and client secret from this account. Use them to fetch an access token from IMS. Pass this token into your API request to create a folder in AEM Forms as a Cloud Service.
-
Make sure the technical account has the right permissions in AEM. Assign roles such as
content-authors, DAM-users, andjcr:all at /content/dam. After setup, the API calls should work as expected. -
Follow these links to generate the access token:
If these steps don’t resolve the issue, investigate specific configuration settings or logs to identify potential discrepancies or errors unique to your setup.
Note:
Please refer to the list to distinguish which APIs are authenticated using Adobe Developer Console and which are authenticated using the AEM Developer Console:
-
Adobe Developer Console:
-
Document conversion
PDF to XDP (PDF Utility)
-
Document Extraction
getPDFPropertiesgetUsageRightsgetMetaDataexportData
-
Document Transformation
importMetadata
-
Document Assurance
applyUsageRights
-
Document Generation
generate interactive PDFcheck Async StatusRetrieve async completed PDF
-
AEM Developer Console:
-
Output Service
generatePDFgeneratePrint
-
EC Service
Password EncryptionRemove Password EncryptiongetEncryption Typessign PDFcertify PDFadd sign field
-
Assembler
invoketoPDFAisPDFA
Documentation available for these APIs:
Adobe Developer Console:
AEM Developer Console: