Claim Rules
Claim Rule Concepts
After a successful authentication and authorization step, ProAuth is issuing the requested tokens with appropriate claims. The claims which are included in the issued tokens can be customized with the claim rule engine. However, mandatory or sensitive claims (i.e. sub) cannot be modified by the claim rule engine.
The purpose of the claim rule engine is:
- filter not needed / not wanted claims
- change a claim's type or value based on conditions
- add new claims based on conditions
- define destinations for ID tokens, access tokens and UserInfo
Before tokens are issued, permitted rule inputs are processed by the claim rule engine. Issuer context requires an explicit input source, and private protocol state is excluded. Final disclosure respects the configured destinations and request conditions; mandatory protocol claims are enforced separately.
Claim rules can be defined for different organizational levels, namely Subscription level, Tenant level, Client Application level, and a combination of Client Applications and Idp Instances. So all the claim rules applicable for the current login process are evaluated.

Applicable rules are grouped by Priority and processed in ascending order. Assignment level selects which rules apply; it does not determine their execution order. Outputs within one priority group are combined. Matching type/value outputs are deduplicated and their destination permissions are merged. A broad forwarding rule in the same group can therefore preserve values omitted by another rule.
For the Pipeline input source, the preceding group’s output becomes the next group’s input. Explicit UserProfile and IssuerContext sources select their respective canonical data independently. The final results provide optional claims for issuance, subject to destination and disclosure conditions. Protocol-required claims are enforced separately.

There are currently four types of claim rules:

Filter Claim Rule
A filter claim rule filters the the claims according to their type or value or a combination of both. Only claims which match the filter criteria will be forwarded to the result set.
Filter type:
- Filter claim type by regex
- Filter claim value by regex
- Filter claim type by regex and claim value by regex
Transform Claim Rule
A transformation claim rule modifies the type or value or both of a claim and forwards the modified claim to the results.
- Match Criteria (same as filter, only matched claims are transformed)
- Match claim type by regex
- Match claim value by regex
- Match claim type by regex and claim value by regex
- Transform
- Transform claim type by regex and replacement pattern
- Transform claim value by regex and replacement pattern
- Transform claim type and claim value by regex and replacement pattern
- Match Criteria (same as filter, only matched claims are transformed)
Create Claim Rule
The create claim rule creates an additional claim to the results.
- Create Rule
- Fixed value for type or value
- Template variables (user properties)
- Create Rule
Conditional Create Claim Rule
The conditional create claim rule creates an additional claim if the condition applies. If the condition is true from multiple claims, only a single new claim is created.
- Match Criteria (same as filter, only if at least one match occurred, the new claim is created)
- Match claim type by regex
- Match claim value by regex
- Match claim type by regex and claim value by regex
- Create Rule
- Fixed value for type or value
- Template variables (user properties)
- Match Criteria (same as filter, only if at least one match occurred, the new claim is created)
Each rule assigns destinations to its outputs. Source preserves the input’s destination and disclosure conditions; None keeps an intermediate result without disclosing it. Both means access token plus ID token and does not include UserInfo. The claim disclosure guide lists all destinations and their serialized values.
Always permits disclosure without a claim request. WhenRequested requires an applicable scope or exact claim request at the permitted destination. Requests cannot grant missing permission or restore a filtered pipeline result.
Claim Rule Usage
The AdminApp editor follows the configuration workflow: Identity and status, Applies to, Rule behavior, Match source claims, and Output claims. Record identifiers appear last. Select the rule type before entering expressions; the editor shows the matching and transformation fields needed by that rule type. A Filter rule copies matching claims into the output. A Transform rule applies its replacement expressions to matching claims. Create and Conditional create use the output type and value directly; Conditional create also requires a matching source claim.
To create a client application rule, open Applies to and choose Client App. Under Client Apps, select one or more applications in the rule’s subscription and apply the selection. For a rule scoped to both applications and an identity provider, also select the identity provider instance. Save the rule with these assignments.
To narrow an existing tenant or subscription rule to specific applications, change its level, select the clients and save. ProAuth validates the scope and assignments together. A failed change preserves the previously saved rule.
Claim rules are defined in a subscription, independently of the claim rule association. Therefore claim rules cannot be shared between subscriptions. If no claim rules exist in a subscription, only the mandatory claims will be present in the issued tokens, all other claims will be dropped.
Rules run in ascending priority groups. A Pipeline rule can forward only the previous group’s results. An explicitly selected UserProfile or IssuerContext source is independent of that pipeline, and Create rules can generate new values. Place rules in the intended group and ensure later filters retain the required outputs.
Configured claim rules can either be active or deactivated. This is controlled by the "Active" property when creating or editing a claim rule.
Claim rules support Liquid templates with selected user and client scalar fields, user-profile key/value pairs, client metadata key/value pairs and authentication context. These are safe data projections. Client credentials, MFA secrets and entity navigation graphs are unavailable, including through aliases and the json filter. The original authentication credentials remain available only to internal authentication services. Profile and metadata values remain administrator-controlled, template-visible data.
Below you can see some of the ProAuth properties and their respective syntax to be used within a Claim rule configuration:
ProAuth User properties:
First Name
{{ User.FirstName }}Last Name
{{ User.LastName }}Email Address
{{ User.EmailAddress }}Organisational Unit
{{ User.OrganizationalUnit }}Manager
{{ User.ManagerId }}Id
{{ User.Id }}User is Active
{{ User.IsUserActive }}Subscription Id
{{ User.SubscriptionId }}
ProAuth User Profiles consisting of Key:Value pairs.
To serialize the available pairs safely:
liquid{{ User.ProAuthUserProfiles | json }}Example output:
json[{ "Key": "department", "Value": "engineering" }]
ClientApp properties
Id
{{ ClientApp.Id }}Name
{{ ClientApp.Name }}Resource Filter Enabled
{{ ClientApp.ResourceFilterEnabled }}Scope Filter Enabled
{{ ClientApp.ScopeFilterEnabled }}ClientUri
{{ ClientApp.ClientUri }}LogoUri
{{ ClientApp.LogoUri }}Enabled
{{ ClientApp.Enabled }}Is Public
{{ ClientApp.IsPublic }}Is Restricted
{{ ClientApp.IsRestricted }}Include Groups Claims
{{ ClientApp.IncludeGroupsClaims }}SubscriptionId
{{ ClientApp.SubscriptionId }}
ClientApp Metadata consisting of Key:Value pairs.
To serialize the available pairs safely:
liquid{{ ClientApp.Metadata | json }}Example output:
json[{ "Key": "brand", "Value": "portal" }]
Context properties
TenantId
{{ Context.TenantId }}ClientAppId
{{ Context.ClientAppId }}IdpInstanceId
{{ Context.IdpInstanceId }}SubscriptionId
{{ Context.SubscriptionId }}IsUserStoreLogin
{{ Context.IsUserStoreLogin }}LoginName
{{ Context.LoginName }}Host
{{ Context.Host }}
See claim disclosure for v2 rule inputs, destinations, requested-only claims and migration requirements.