Deploying new universal login page template

We are trying to do exactly the same as in this post and deploy the new universal login page template using the auth0 deployment client: (Deploy Customized Universal Login Page with Auth0 Deploy CLI)

But we are getting errors:

2024-07-05T08:55:25.722Z - error: Problem running command import during stage processChanges when processing type tenant
2024-07-05T08:55:25.722Z - error: Payload validation error: 'Additional properties not allowed: templates' on property universal_login (Universal login customization settings).
2024-07-05T08:55:25.722Z - info: Please refer to the Auth0 Management API docs for expected payloads: https://auth0.com/docs/api/management/v2

This is in the tenant.json

  "universal_login": {
    "colors": {
      "page_background": "#1450f5",
      "primary": "#1450f5"
    },
    "templates": [
      {
        "template": "universal_login",
        "body": "./branding-template/universal_login.html"
      }
    ]
  }

In folder branding-template/universal_login.html we have the page template.

Found the solution by reverse engineering by deploying the page template with management api ant then exporting the configuration.

Correct structure is to have page template html and json file in branding/templates folder like this:

image

The universal_login.json file contents:

{
  "template": "universal_login",
  "body": "./universal_login.html"
}

With that structure auth0 deployment client deployed the page template.

1 Like