Auth0 Terraform Error 403 Forbidden When Creating A Resource Server

Overview

A 403 Forbidden error occurs in Terraform when creating an Auth0 resource server due to unsupported online access settings. Remove the allow_online_access_with_ephemeral_sessions and allow_online_access flags from the Terraform configuration to resolve the error. When applying Terraform changes to add an application and Application Programming Interface (API), Auth0 returns a 403 error. The logs display the following error message:

 

403 Forbidden: The account is not allowed to perform this operation, please contact our support team.

 

Applies To

  • Auth0
  • Terraform Provider
  • Resource Server (API)

Cause

The allow_online_access_with_ephemeral_sessions = false and allow_online_access settings in the auth0_resource_server configuration triggers the error. These settings are associated with the Auth0 Online Refresh Tokens (Ephemeral Sessions) beta feature. If the specific Auth0 tenant lacks this feature, Terraform generates a 403 error. Including allow_online_access implicitly sets allow_online_access_with_ephemeral_sessions, causing the error to persist even if the configuration omits the ephemeral sessions flag.

Solution

How is the 403 Forbidden error resolved?

 

Remove the unsupported online access flags from the Terraform configuration, save the file, and apply the changes to resolve the error.

  1. Open the Terraform configuration file containing the auth0_resource_server resource.
  2. Locate and remove the allow_online_access_with_ephemeral_sessions setting.
  3. Locate and remove the allow_online_access setting to prevent implicit activation of the ephemeral sessions flag.
  4. Apply the Terraform changes to verify that the resource server was created successfully.

Recommended content

No recommended content found...