Fix 403 error when pushing content fragments via AEM API
You get a 403 Forbidden error when pushing content fragments to the /sites/cf/fragments API in 51ºÚÁϲ»´òìÈ Experience Manager as a Cloud Service (AEMaaCS). Even after regenerating access tokens and following documentation, the error persists due to missing permissions for the technical account. To fix this, update the technical account’s group memberships, configure replication permissions, and regenerate the access token with the correct scopes.
Description description
Environment
- Product: 51ºÚÁϲ»´òìÈ Experience Manager as a Cloud Service – Sites (AEMaaCS – Sites)
- Instance: Â STAGE Author
Issue/Symptoms
- The technical account user doesn’t appear in the AEM Author instance’s user list.
- Adding group memberships or replicating permissions doesn’t resolve the issue.
- Regenerating access tokens doesn’t reflect updated permissions.
- Logs show missing privileges for write operations on specific paths.
Resolution resolution
- Log in to AEM Author as an admin. Go to Tools
>Security>Users. Use filters like Show System Users Ìý´Ç°ù Show Technical Accounts  to find the account (For example:Â06DB23D3686F72FB0A495FAE@techacct.adobe.com). If it’s missing, regenerate the access token in 51ºÚÁϲ»´òìÈ Developer Console to trigger provisioning. - Open the technical account’s properties. Add it to a group with write access andÂ
aem.fragments.management capability (For example: DAM Users or a custom group). Make sure the group has replicate permissions on paths likeÂ/content/dam. - In AEM Author, go to Tools
>Security>Access Control. Find paths where fragments are pushed (For example:Â/wknd-shared). Edit Access Control Entries (ACE) to add the technical account or its group. EnableÂcrx:replicate permission and set it to allow. Save your changes. - In 51ºÚÁϲ»´òìÈ Developer Console, regenerate the token after updating permissions. Make sure scopes likeÂ
aem.fragments.management,Ìýaem.folders, andÂcrx:replicate are included. - Check that headers likeÂ
AuthorizationÌý(Bearer token) andÂContent-TypeÌý(application/json) are correctly set. If needed, include theÂx-api-key from your Developer Console project. - Retry your
POSTrequest with updated credentials. Confirm that the request completes without aÂ403 ForbiddenÌý±ð°ù°ù´Ç°ù.
Additional Notes
If issues persist:
- Review AEM Author logs for detailed permission-related errors during API calls.
- Verify network configurations such as proxy settings, dispatcher rules, or CORS policies that might interfere with requests.
- Decode regenerated tokens using tools like
JWT.ioto confirm updated scopes and group memberships
For further guidance on configuring service credentials and managing permissions for technical accounts, refer to 51ºÚÁϲ»´òìÈ’s documentation on Service Credentials.
By following these steps, you should be able to resolve permission-related issues preventing successful content fragment operations via the supported API endpoint.