Organization Parameters Return Empty Values in Password Change Email Templates

Overview

Organization parameters such as {{ organization.id }} or {{ organization.name }} resolve to empty strings within email branding templates. This issue typically occurs when users trigger a password change request.

Applies To
  • Universal Login

  • Email Templates

  • Organizations

Cause

The Universal Login Experience cannot identify the organization ID associated with the user during the login process unless explicitly prompted. Additionally, organization parameters remain unavailable if the organization ID is not explicitly specified in the Authentication API request.

Solution

To ensure organization parameters populate correctly, use one of the following methods based on the implementation.

Universal Login Experience

Configure the login flow to use "Prompt for Organization" so the Universal Login Experience identifies the correct organization. Refer to Configure the login flow for your application for instructions.

Alternatively, include an organization parameter in the authorization request. For example, if using express-openid-connect:

authorizationParams: {
    response_type: 'code',
    scope: 'openid profile email',
    audience: '<audience_value>',
    organization: "<org_id>",
  },

 

Authentication API Request

Specify the organization ID in the request.

POST https://<domain>/dbconnections/change_password
{
  "client_id": "<client_id>",
  "email": "<user_email>",
  "connection": "testdatabase",
  "organization": "<org_id>"
}

Recommended content

No recommended content found...