Skip to content

IAM: Email Notifications

The IAM module sends automated emails for various user and permission management events. This page explains which emails are sent and when, and how notification templates can be customized.

For day-to-day IAM tasks (managing users, groups, permissions, clients), see the IAM Overview.

SMTP configuration

Sending these notifications requires a working SMTP server configured during installation. For setup details and the full parameter reference, see IAM Helm Chart Configuration → SMTP Configuration for Email Notifications.

Overview

The IAM system sends emails for the following scenarios:

  • User registration and password reset (handled by Keycloak)
  • Forgot password requests (handled by Keycloak)
  • Permission assignment/unassignment notifications (handled by IAM API)
  • Group membership change notifications (handled by IAM API)

Email Types

Registration and Password Reset Emails

Source: Keycloak
Trigger: Automatic on user creation, manual from IAM user details page

These emails contain:

  • Password setup/reset link

To manually send a password reset email, see Send a reset email in the IAM Overview.

Forgot Password Emails

Source: Keycloak
Trigger: User-initiated from login page

Process:

  1. User clicks "Forgot Password" on login page
  2. User enters their email address
  3. Keycloak sends password reset instructions
  4. User follows the link to set a new password

Permission Assignment Change Notifications

Source: IAM API
Trigger: Automatic when permission assignments change

When emails are sent:

  • Direct permission assignment to user
  • Permission assignment to group (sent to all group members)
  • Direct permission removal from user
  • Permission removal from group (sent to all group members)
  • Cascade delete operations (sent to all affected users, both direct and through groups)

The system sends two types of permission change emails:

1. Permissions Assigned

  • Catalog keys: emails.permissionsAssigned.subject / emails.permissionsAssigned.body
  • Sent when: Permissions are directly assigned to a user or to a group
  • Content includes: User name, application name, list of assigned permissions

2. Permissions Unassigned

  • Catalog keys: emails.permissionsUnassigned.subject / emails.permissionsUnassigned.body
  • Sent when: Permissions are directly removed from a user or from a group
  • Content includes: User name, application name, list of unassigned permissions

Smart Deduplication

The system automatically handles complex scenarios:

  • When a permission is deleted with cascade, the system resolves all affected users (both directly assigned and through groups) and sends only one email per unique user
  • Users who have permissions through multiple groups receive a single consolidated notification

Group Membership Change Notifications

Source: IAM API
Trigger: Automatic when users join or leave groups

When emails are sent:

  • User added to group
  • User removed from group

1. User Joined Group

  • Catalog keys: emails.userJoinedGroup.subject / emails.userJoinedGroup.body
  • Sent when: A user is added to a group
  • Content includes: User name, application name, group name

2. User Left Group

  • Catalog keys: emails.userLeftGroup.subject / emails.userLeftGroup.body
  • Sent when: A user is removed from a group
  • Content includes: User name, application name, group name

Email Template Configuration

IAM API notification subject and body text live in the shared translation catalog under the emails root (bundled en-GB). Customize them per realm by importing locale overrides that include the same emails.* keys used for UI strings — via Settings → Languages or PUT /Translations/admin/{locale} (both IAM super admin only).

The Helm EmailTemplates ConfigMap used in IAM 1.6 and earlier is removed in 1.7. Operators upgrading with custom ConfigMap text must migrate those strings into locale overrides; see Upgrading IAM to 1.7.

Available Templates

Template Subject key Body key
Permissions assigned emails.permissionsAssigned.subject emails.permissionsAssigned.body
Permissions unassigned emails.permissionsUnassigned.subject emails.permissionsUnassigned.body
User joined group emails.userJoinedGroup.subject emails.userJoinedGroup.body
User left group emails.userLeftGroup.subject emails.userLeftGroup.body

Template Variables

Bodies use named {{token}} placeholders. The set of tokens on an override must match the en-GB reference for that key.

Token Description Templates
{{firstName}} User's first name All four
{{lastName}} User's last name All four
{{applicationName}} Application display name All four
{{permissions}} Permission list Permissions assigned / unassigned
{{groupName}} Group name User joined / left group

Adding or Customizing a Language

An import replaces all custom translations of the locale

An import stores only the entries in the imported file. Custom translations that are not in the file are deleted, including UI translations. Start from the downloaded custom translations of the locale, not from a file with only emails.* keys.

  1. In Settings → Languages, select the locale and download the custom translations (Download the custom translations).
  2. Add or change the emails.* keys in that file. Keep every {{token}} from the en-GB reference for those keys.
  3. Import the file. In the confirmation dialog, check that the number of removed customizations is 0, then confirm. The same import is available as PUT /Translations/admin/{locale}.
  4. Repeat for each locale you support. Repeat again for each realm that needs different wording.

Language Selection

For IAM API notification emails the resolver layers:

  1. Embedded en-GB catalog
  2. Override for the realm default language (when present)
  3. Override for the recipient's preferred language (when present and different from the default)

If mailing is enabled and a required catalog key is missing, sending fails with an error. Keycloak-handled emails (registration, password reset, forgot password) use the Keycloak theme language and are not resolved from this catalog.