AEM Forms: Resolving 502 errors with Power Automate integration
Adobe Experience Manager (AEM) Forms may return a 502 error when submitting published forms integrated with Power Automate because the integration refresh token has expired after 90 days of inactivity. To resolve the issue, reauthenticate the affected Dataverse and Flow Service connectors, republish their configurations, and verify form submission in Production.
Description description
Environment
- Adobe Experience Manager (AEM) Forms (all versions)
- Power Automate integration through Dataverse and Flow Service connectors
Issue/Symptoms
- Submitting a published form in Production returns a 502 error.
- The same form submits successfully in Preview or Author environments.
- Error logs reference an expired refresh token.
- The issue affects published forms that use the Power Automate integration and prevents successful form submissions and automation triggers.
Root cause
The 502 error occurs because the refresh token for the Power Automate integration expires after 90 days of inactivity. AEM Forms doesn’t provide a configuration to extend the token validity period beyond 90 days.
Resolution resolution
Follow the steps below to resolve the issue:
-
Sign in to the AEM Author instance as an administrator.
-
Go to the Cloud Services configuration where the Power Automate integrations are configured, typically under Tools
>Cloud Services>the relevant Power Automate configuration. -
For each affected connector, such as Dataverse and Flow Service:
- Reauthenticate the connector by following the prompts to sign in and grant permissions.
- Republish the connector configuration to apply the new authentication tokens.
-
After republishing, verify that the connector status doesn’t indicate that it’s outdated or invalid.
-
Test the form submission in the Production environment and confirm that the 502 error no longer occurs.
-
Repeat these steps for any other connectors integrated with Power Automate as needed.