Understanding Claim Logic in Policies
Section titled “ Understanding Claim Logic in Policies”A Policy grants access only when the user's access token holds its Claims. How several Claims, and several Policies on one Role, combine decides who gets in, and a wrong change can lock everyone out.
- ✅ AND within a Policy: every Claim must match
- ✅ OR between the Policies of a Role: one matching Policy is enough
- ✅ Conflicting Claims: one Key with two values in one Policy, and the fix
- ✅ Validation rules that stop an empty Policy
AND Logic Within a Policy
Section titled “AND Logic Within a Policy”Critical Rule: All Claims within a single Policy use AND logic. Users must match ALL Claims in the Policy to satisfy it. Key and Value are trimmed and compared without regard to case (Group = contoso-finance matches Contoso-Finance).

One extra Claim is enough: contoso.finance has no Contoso-Managers group, so the Policy no longer matches and the user gets the Forbidden page.
Yellow: the Role (OR between its Policies); blue: the Policies; teal boxes: the Claims of each Policy, in green, joined by AND.
Key Insights
Section titled “Key Insights”- OR between Policies - User needs to match ANY ONE of the Policies assigned to the Role
- AND within Policies - User must match ALL Claims within a single Policy
- If user satisfies AdminInSweden Policy (has Country=Sweden AND Group=Admin), they get Admin role ✅
- If user satisfies AdminInNorway Policy (has Country=Norway AND Group=Admin), they get Admin role ✅
- If user satisfies AdminInDenmark Policy (has Group=AdminInDenmark), they get Admin role ✅
Example: AdminInSweden
Section titled “Example: AdminInSweden”Policy: "AdminInSweden"Claims: * Country=Sweden (AND) * Group=Admin (AND)Result: Users must have BOTH Claims to match this Policy:
- ✅ User has
Country=SwedenANDGroup=Admin→ Access granted - ❌ User has only
Country=Sweden→ Access denied - ❌ User has only
Group=Admin→ Access denied
OR Logic Between Policies
Section titled “OR Logic Between Policies”To achieve OR logic, create separate Policies and assign both to the same Role. You assign a Policy to a Role in the Policy's Roles card; the Role's Policies card only lists them.

Two Policies on one Role: a user who matches either one, here contoso.logistics, gets the Role.
Example: Nordic Administrator
Section titled “Example: Nordic Administrator”Policy: "AdminInDenmark"Claims: * AdminInDenmark=true
Policy: "AdminInSweden"Claims: * AdminInSweden=true
Policy: "AdminInNorway"Claims: * AdminInNorway=true
Role: "Nordic Administrator"Policies: * AdminInDenmark (OR) * AdminInSweden (OR) * AdminInNorway (OR)Result: Users with ANY of these Claims get the "Nordic Administrator" role:
- ✅ User has
AdminInDenmark=true→ Access granted - ✅ User has
AdminInSweden=true→ Access granted - ✅ User has
AdminInNorway=true→ Access granted - ✅ User has all three Claims → Access granted
The Conflicting Claims Problem
Section titled “The Conflicting Claims Problem”Invalid Policy Configuration
Section titled “Invalid Policy Configuration”Policy: "Nordic Admin" (INVALID!)Claims: * Country=Denmark (AND) * Country=Sweden (AND) * Country=Norway (AND)Why This Fails
Section titled “Why This Fails”- Policy requires ALL Claims (AND logic)
- A single-valued claim such as
Countrycarries one value in the token - User cannot have
Country=DenmarkANDCountry=Swedensimultaneously - ❌ No user can ever satisfy this Policy
- ❌ Everyone is blocked from access
A multi-valued claim is different: every value in the token counts, so a user in two groups satisfies Group=Finance AND Group=Managers. That is a valid way to require membership of both groups.
Visual Representation
Section titled “Visual Representation”User's Claims from IDP: AdminInDenmark: true Group: Admin
Policy "Conflicting Example" requires: AdminInDenmark: true (AND) ← User has this AdminInDenmark: false (AND) ← User doesn't have this
Result: Policy NOT satisfied → Access DENIEDCorrect Pattern: Separate Policies for OR Logic
Section titled “Correct Pattern: Separate Policies for OR Logic”Valid Configuration
Section titled “Valid Configuration”Policy: "DenmarkAccess"Claims: * Country=Denmark
Policy: "SwedenAccess"Claims: * Country=Sweden
Policy: "NorwayAccess"Claims: * Country=Norway
Role: "Nordic Administrator"Policies: * DenmarkAccess * SwedenAccess * NorwayAccessResult: Users from any Nordic country get access:
- ✅ User with
Country=Denmark→ Matches "DenmarkAccess" Policy - ✅ User with
Country=Sweden→ Matches "SwedenAccess" Policy - ✅ User with
Country=Norway→ Matches "NorwayAccess" Policy
Validation Rules
Section titled “Validation Rules”Nodinite enforces these validation rules when managing Policies:
Empty Policy Detection
Section titled “Empty Policy Detection”The Web Client keeps Save disabled and shows You must select at least one Claim and at least one Role to be able to save the Policy. until the Policy has both. New 7.12 The Web API applies the same rule: it refuses a Policy without a Claim or without a Role with HTTP 400, also when a script or an MCP tool sends it. An empty Policy grants nothing: Policies without Claims, and deleted Policies or Claims, are skipped when Nodinite works out a user's Roles.
The name must be unique, compared without regard to case and including deleted Policies; otherwise the Web API answers Policy Name '…' is already in use. Restore the deleted Policy instead of creating a new one.
There is no check for two Claims with the same Key: see The Conflicting Claims Problem for when that works and when it locks everyone out.
Complex Scenarios
Section titled “Complex Scenarios”Valid: Multiple Keys, Different Values
Section titled “Valid: Multiple Keys, Different Values”Policy: "Finance Manager Sweden"Claims: * Department=Finance ← Different key * Country=Sweden ← Different key * AccessLevel=Admin ← Different key * Environment=Production ← Different keyAll different keys → ✅ Valid
Invalid: Same Key, Different Values
Section titled “Invalid: Same Key, Different Values”Policy: "Multi-Environment" (INVALID!)Claims: * Environment=Production (AND) * Environment=Test (AND)Same single-valued key with different values → ❌ No user can match
Valid but Redundant: Same Key, Same Value
Section titled “Valid but Redundant: Same Key, Same Value”Policy: "Redundant Example"Claims: * Country=Sweden * Country=Sweden ← Duplicate, but same valueSame key with same value → ✅ Valid but redundant (system may deduplicate)