Notification Templates & Configuration

GrantFlow's notification system keeps stakeholders informed about critical access events — role activations, approval requests, account checkouts, and administrative changes. Configure which events trigger notifications, choose delivery channels, and customize message templates.

Overview

The notification system consists of three parts:

  1. Event Types — What triggers a notification (e.g., activation requested, approval needed)
  2. Channels — How notifications are delivered (email, in-app, Teams)
  3. Templates — What the notification message contains

Event Types

GrantFlow supports 19 notification event types grouped into four categories. Events marked System are routed to system recipients instead of deriving recipients from the event context.

Approval & Activation Events

EventDescriptionRecipients
Approval.RequestedA user requested role activation requiring approvalAssigned approvers
Activation.SucceededA role activation completed successfullyRequester
Activation.FailedA role activation failedRequester
Activation.ExpiredA role activation reached its time limitRequester
Activation.RevokedA role activation was manually revokedRequester

Role Lifecycle Events

EventDescriptionRecipients
Role.EnabledA role was enabledRequester
Role.DisabledA role was disabledRequester
Role.RequestApprovedA role request was approvedRequester
Role.RequestDeniedA role request was deniedRequester
Role.NeedsApprovalA role request needs approvalAssigned approvers

Account Events

EventDescriptionRecipients
Account.EnabledAn account was enabled (checked out for use)Requester
Account.DisabledAn account was disabled (checked back in after use)Requester
Account.PasswordRolloverAn account password was rotatedSystem recipients System

System Events

System events alert administrators about infrastructure health and do not have a per-user recipient. They are delivered to the addresses listed in system recipients.

EventDescriptionRecipients
Agent.OnlineAn on-premises agent connectedSystem recipients System
Agent.OfflineAn on-premises agent went offlineSystem recipients System
Agent.CertExpiringAn agent certificate is approaching expirySystem recipients System
Agent.RequiresUpdateAn agent is running an outdated versionSystem recipients System
DirSync.CompletedA directory synchronization completed successfullySystem recipients System
DirSync.FailedA directory synchronization failedSystem recipients System
System.NotificationGeneric system notification (maintenance, announcements)System recipients System

System Recipients

System events (agent alerts, directory sync results, password rollovers, and generic system notifications) do not have a natural per-user recipient. Instead, they are delivered to the system recipients list you configure in the email channel settings.

Configuration:

  1. Navigate to Admin > Notification Configuration
  2. In the Email channel settings, find the System Recipients field
  3. Enter one or more email addresses — these addresses receive all system event notifications
  4. Save the configuration

If no system recipients are configured, system events are still logged in the Delivery Log but no email is sent.

Smart Event Debouncing

Short-lived connectivity interruptions — such as network blips, rolling updates, or brief host restarts — can produce rapid pairs of Agent.Offline and Agent.Online events. Without filtering, each pair would trigger two separate emails within seconds of each other.

GrantFlow automatically holds Agent.Offline notifications for a short window before sending. If the same agent reconnects within that window, both the offline and online notifications are silently suppressed. The result: you only receive an alert when an agent is genuinely unreachable, not when it bounces for a few seconds.

This behavior applies automatically — there is no configuration required. If the agent does not come back online within the hold window, the offline notification is delivered normally.

INFO

Debouncing only affects Agent.Offline / Agent.Online pairs. Agent.RequiresUpdate has its own throttling (see below). All other event types are delivered immediately.

Agent Update Notifications

When an on-premises agent connects with a version older than the latest published release, GrantFlow sends an Agent.RequiresUpdate notification to system recipients. This helps you keep agents current and ensures compatibility with new features and security patches.

Update notifications are throttled to once per 24 hours per agent — even if an agent reconnects multiple times during the day, administrators receive at most one reminder. The throttle resets automatically after 24 hours.

TIP

If you don't want update notifications, leave the agent releases URL unconfigured in your deployment. The feature is opt-in via the AGENT_RELEASES_URL environment variable on the control plane.

Channels

Email

Email is the primary notification channel. GrantFlow uses Microsoft Graph API to send emails from your tenant's configured sender mailbox.

Configuration:

  1. Navigate to Admin > Notification Configuration
  2. Select the Email channel
  3. Configure the sender mailbox and display name
  4. Add system recipients for agent, sync, and other system alerts
  5. Test the configuration with a test email

Teams (Coming Soon)

Microsoft Teams channel notifications via webhook connectors will be available in a future release.

In-App Notifications

In-app notifications appear in the GrantFlow notification bell. These are always enabled for the requesting user and cannot be disabled.

Templates

Template Editor

Each event type has a customizable email template. Navigate to Admin > Notification Templates to view and edit templates.

Templates support:

  • Subject line — The email subject
  • Body — HTML email body with placeholder support
  • Rich text formatting — Bold, italic, links, lists

Placeholder Syntax

Use double curly braces to insert dynamic values:

PlaceholderDescriptionExample Value
{{.UserDisplayName}}Name of the affected userJane Smith
{{.UserEmail}}Email of the affected userjane@contoso.com
{{.RoleName}}Name of the roleGlobal Administrator
{{.ConnectorName}}Name of the connectorContoso Entra ID
{{.AccountName}}Name of the accountadmin-svc
{{.Justification}}Reason provided by requesterMonthly audit review
{{.ActivationStart}}Activation start time2025-01-15 09:00 UTC
{{.ActivationEnd}}Activation end time2025-01-15 17:00 UTC
{{.Duration}}Activation duration8 hours
{{.ApproverName}}Name of the approverJohn Admin
{{.TenantName}}Your tenant display nameContoso Corp
{{.PortalUrl}}Link to GrantFlow portalhttps://app.grantflow.cloud
{{.RequestId}}Unique request identifierreq-abc123
{{.Timestamp}}Event timestamp2025-01-15T09:00:00Z

Agent Event Placeholders

These placeholders are available in Agent.Online, Agent.Offline, Agent.CertExpiring, and Agent.RequiresUpdate templates.

PlaceholderDescriptionExample Value
{{.AgentName}}Agent identifieragent-dc01
{{.DisplayName}}Human-readable agent nameDC01 Domain Controller
{{.ComputerName}}Host machine nameDC01.contoso.local
{{.ConnectorName}}Associated connectorContoso AD
{{.PeerIP}}Agent's IP address10.0.1.50
{{.ConnectedAt}}Connection timestamp (online)2025-03-15T09:00:00Z
{{.LastSeen}}Last heartbeat timestamp (offline)2025-03-15T08:55:00Z
{{.CurrentVersion}}Agent's current version (update events)v1.2.0
{{.LatestVersion}}Latest available version (update events)v1.3.1

Account Event Placeholders

These placeholders are available in Account.Enabled, Account.Disabled, and Account.PasswordRollover templates.

PlaceholderDescriptionExample Value
{{.AccountName}}Account nameadmin-svc
{{.AccountUPN}}Account User Principal Nameadmin-svc@contoso.com
{{.ConnectorName}}Connector the account belongs toContoso AD
{{.UserDisplayName}}User who performed the actionJane Smith
{{.UserEmail}}Email of the acting userjane@contoso.com
{{.EnabledBy}}Who enabled the account (checkout)Jane Smith
{{.DisabledBy}}Who disabled the account (check-in)System
{{.EnabledAt}}Checkout timestamp2025-03-15T09:00:00Z
{{.DisabledAt}}Check-in timestamp2025-03-15T17:00:00Z
{{.ExpiresAt}}Checkout expiry (enabled events)2025-03-15T17:00:00Z
{{.RotatedAt}}Password rotation timestamp2025-03-15T17:01:00Z
{{.Reason}}Reason for disable/check-incheckout expired

Directory Sync Placeholders

These placeholders are available in DirSync.Completed and DirSync.Failed templates.

PlaceholderDescriptionExample Value
{{.ConnectorName}}The connector that ran the syncContoso AD
{{.SyncType}}Sync modefull or partial
{{.UsersProcessed}}Number of users synced142
{{.GroupsProcessed}}Number of groups synced38
{{.Reason}}Error reason (failed syncs only)LDAP connection timeout

Example Template

text
Subject: Role Activation Approved - {{.RoleName}}

Hi {{.UserDisplayName}},

Your request to activate **{{.RoleName}}** on **{{.ConnectorName}}**
has been approved by {{.ApproverName}}.

**Details:**
- Start: {{.ActivationStart}}
- End: {{.ActivationEnd}}
- Duration: {{.Duration}}
- Justification: {{.Justification}}

View in GrantFlow: {{.PortalUrl}}

Reset to Default

If you have customized a template and want to revert, click Reset to Default on the template editor. This restores the original GrantFlow template for that event type.

Timezone Settings

Notification timestamps use the tenant's configured timezone by default. Users see times formatted according to their browser locale when viewing in-app notifications.

To configure the tenant timezone:

  1. Navigate to Admin > Tenant Settings
  2. Set the Display Timezone for email notifications
  3. All email timestamps will use this timezone

Best Practices

  • Start with defaults — GrantFlow ships with sensible default templates. Only customize when you have specific branding or compliance requirements.
  • Test after changes — Use the Send Test button after editing a template to verify formatting and placeholder resolution.
  • Keep subjects concise — Email subjects should be scannable. Include the event type and key identifier (role name, account name).
  • Include portal links — Always include the portal URL placeholder so recipients can take action directly.
  • Review delivery logs — Monitor the Notification Delivery Log to verify notifications are being delivered.

Security Considerations

  • Notification templates are tenant-scoped — changes only affect your tenant
  • Email sending requires a configured Microsoft Graph mail permission
  • Template placeholders are sanitized before rendering to prevent injection
  • Delivery logs retain records for audit compliance

Troubleshooting

IssueSolution
Emails not sendingVerify email channel configuration and Graph API permissions
Placeholders showing raw textCheck placeholder syntax uses the correct double curly brace format
Wrong timezone in emailsUpdate tenant timezone in Admin > Tenant Settings
Missing notificationsCheck event type is enabled in Notification Configuration
System events not deliveredVerify system recipients are configured in email channel settings
Template changes not appliedTemplates are cached briefly — wait 1-2 minutes and retry

See Also