AEM as a Cloud Service: Resolving Groovy Console script execution permission errors after upgrade
This article explains how to resolve the You do not have permission to run scripts in the Groovy Console. error that occurs after upgrading the Groovy Console to version 19.1.0 on AEM as a Cloud Service.
Description description
Environment
Adobe Experience Manager as a Cloud Service (AEMaaCS) with Groovy Console upgraded from a previous version to 19.1.0
Symptoms
- After upgrading the Groovy Console, the console page loads, and the bundle is active, but attempting to execute any Groovy script (such as
println("Hello World")) results in the error: You do not have permission to run scripts in the Groovy Console. - This issue didn’t occur with the previous version, and the affected user can still access the console UI.
Cause
The 19.1.0 Groovy Console introduced a new authorization configuration mechanism. After the upgrade, previous allowed-group settings aren’t retained, and script execution is denied unless the correct groups are explicitly configured in the OSGi configuration and deployed.
Resolution resolution
Follow the steps below to resolve the issue:
- Locate the OSGi configuration for
be.orbinson.aem.groovy.console.configuration.impl.DefaultConfigurationServicein your project codebase. - Update the configuration to ensure that the
allowedGroupsandallowedScheduledJobsGroupsproperties include the exact AEM group names assigned to users who require script execution access. Group names must match exactly. - Deploy the updated configuration through the Cloud Manager pipeline to the appropriate environment.
- After deployment, verify that affected users can execute a simple Groovy script (such as
println("Hello World")) in the Groovy Console. - If the issue persists, confirm that the user’s group membership in AEM matches the group names specified in the configuration and that the configuration is active in the target environment.
recommendation-more-help
experience-cloud-kcs-help-kbarticles