Investigate missing OAuth scopes for AEM as a Cloud Service API integrations

This article explains why some OAuth scopes available in AEM on-premise or SDK environments are not present in AEM as a Cloud Service, and provides steps to configure OAuth Server-to-Server integrations to obtain the required scopes for API access.

Description description

Environment

Adobe Experience Manager as a Cloud Service using OpenAPI-based APIs

Issue/Symptoms

  • An integration requires an API scope, such as aem.folders or aem.assets.author, that is absent from its access token.
  • The token was generated using a different credential or API setup than the integration uses in AEM as a Cloud Service.
  • The API call fails with an authorization or missing-scope error.

Cause

The default AEM environment technical account and an OAuth Server-to-Server credential configured for an OpenAPI-based AEM API are different credentials. Available scopes depend on the selected API and its entitlement; they are not added by manually editing the default technical account. The Product Profile and associated services grant authorization, while client ID registration enables the configured integration to communicate with the AEM environment. AEM group permissions and repository ACLs also apply.

Resolution resolution

Follow the steps below to resolve the issue:

  1. In the Adobe Admin Console, verify that your organization has the required AEM Assets entitlements and product profiles for the AEM as a Cloud Service instance.
  2. In the Adobe Developer Console, create a project for the integration or open an existing project.
  3. Add the relevant AEM API, such as the AEM Assets Author API or Content Fragment Management API, to the project.
  4. When adding the API, select OAuth Server-to-Server as the authentication method.
  5. Associate the integration with the appropriate product profile for the AEM as a Cloud Service Author environment.
  6. Save the configuration to generate the OAuth credentials, including the client ID and client secret.
  7. If required by your organization’s process, allowlist the OAuth client ID in the AEM as a Cloud Service environment to enable API access.
  8. Verify that the product profile and integration have the permissions required for the relevant AEM paths and operations.
  9. Use the generated OAuth credentials to request access tokens. Based on the available entitlements and configuration, the tokens should include the required scopes, such as aem.folders and aem.assets.author.
  10. Generate an access token and verify that it contains the required scopes.
recommendation-more-help
experience-cloud-kcs-help-kbarticles