AEM as a Cloud Service + CIF Addon - /api/graphql not working on Publish SDK

AEM as a Cloud Service + CIF Addon - /api/graphql not working on Publish SDK

September 23, 2026 · Illustrated author avatarBy Stefan Bogdanescu
AEM as a Cloud Service + CIF Addon - /api/graphql not working on Publish SDK

Fixing /api/graphql Issues on Adobe Experience Manager as a Cloud Service

If you’re facing issues with your GraphQL API (/api/graphql) throwing 403 errors after migrating to the AEM Publish SDK, don’t worry—you’re not alone. Let’s dive into this common issue and find a solution.

Understanding the Problem

The core of the problem lies in how the Content Integration Framework (CIF) addon handles authentication for GraphQL requests. When you move your setup from the author instance to the publish SDK, certain security settings aren’t automatically inherited.

In your case, even after excluding /api/graphql from the CSRF filter and removing the POST method restriction, the issue persists because the servlet resolver configuration isn’t correctly updated on the publish side.

Step-by-Step Solution

To resolve this, you need to manually configure the servlet mapping in the publish instance. Here’s a step-by-step guide:

  1. Open your sling-servlet-resolver.config file located at /etc/sling/servlet/resolver.

  2. Under the resolvers node, find the sling-servlet-resolver node.

  3. Within this node, locate the mappings node and add a new node under it. The path should be /api/graphql.

  4. Set the resource-type for this new mapping to cif/magento2/graphql/GraphQLSlingServlet.

  5. Save your changes and publish the page.

If you’re using AEM as a Cloud Service, remember that these changes must be applied on the author instance first before deploying them to the publication environment.

Code Example: Configuring Servlet Mapping

<sling-servlet-resolver>
  <resolvers>
    <sling-servlet-resolver>
      <mappings>
        <node property="path" value="/api/graphql"/>
        <node property="resource-type" value="cif/magento2/graphql/GraphQLSlingServlet"/>
      </mappings>
    </sling-servlet-resolver>
  </resolvers>
</sling-servlet-resolver>

Conclusion: Ensuring GraphQL API Functionality

Migrating to AEM as a Cloud Service and the Publish SDK can be complex, but with the right configurations, you can ensure your /api/graphql endpoint remains functional.

Remember, the key is to manually configure the servlet mapping in the publish instance’s sling-servlet-resolver.config file. By following this guide, you should now be able to resolve 403 errors and successfully use GraphQL API operations on your AEM-powered storefront.

If you’re looking for more tips on optimizing your AEM as a Cloud Service setup, feel free to check out our comprehensive guides at Laravel Company. We cover everything from best practices to advanced customizations to help you get the most out of Adobe’s robust platform.

Magento 2 Security API Configuration

Our network