Authentication Methods
Configure the authentication methods available for step-up MFA. Authentication Methods
Conditional access policies let you enforce dynamic, context-aware security requirements at authentication time. Policies evaluate conditions such as the user’s IP address, device trust level, risk score, group membership, and the application being accessed. Based on these conditions, VeraID can allow, deny, or require step-up MFA.
curl -X POST https://app.veraid.io/api/v1/conditional-access/policies \ -H "Authorization: Bearer kd_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "name": "Block access from untrusted networks", "description": "Deny access to admin dashboard from IPs outside corporate network", "priority": 10, "status": "active", "conditions": { "applications": ["admin-dashboard"], "ipAddresses": { "exclude": ["203.0.113.0/24", "198.51.100.0/24"] } }, "action": "deny", "denyMessage": "Access to the admin dashboard is restricted to the corporate network." }'Restrict access based on the client’s IP address or network range.
{ "name": "Corporate network only for production apps", "priority": 10, "conditions": { "applications": ["production-api", "admin-dashboard"], "ipAddresses": { "exclude": [ "203.0.113.0/24", "198.51.100.0/24", "2001:db8::/32" ] } }, "action": "deny", "denyMessage": "This application is only accessible from the corporate network."}{ "name": "Block known threat IPs", "priority": 1, "conditions": { "ipAddresses": { "include": [ "192.0.2.0/24", "100.64.0.0/10" ] } }, "action": "deny", "denyMessage": "Access denied due to security policy."}Define reusable IP location sets to simplify policy management:
curl -X POST https://app.veraid.io/api/v1/conditional-access/named-locations \ -H "Authorization: Bearer kd_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "name": "Corporate Offices", "type": "ip", "ipRanges": [ "203.0.113.0/24", "198.51.100.0/24", "192.0.2.128/25" ], "trusted": true }'Then reference them in policies:
{ "conditions": { "namedLocations": { "exclude": ["Corporate Offices"] } }, "action": "require_mfa"}Evaluate the security posture of the device before granting access.
| Level | Description | Requirements |
|---|---|---|
managed | Corporate-managed device with MDM enrollment | MDM certificate present, compliant with MDM policies |
compliant | Device meets security baselines | OS up to date, disk encryption enabled, firewall active |
registered | Device is known to VeraID but not fully managed | Device certificate present, user-registered |
unknown | Unrecognized device | No device certificate or registration |
{ "name": "Require managed device for sensitive apps", "priority": 15, "conditions": { "applications": ["finance-portal", "hr-system"], "deviceTrust": { "exclude": ["managed", "compliant"] } }, "action": "deny", "denyMessage": "This application requires a managed or compliant device. Please enroll your device with IT."}Users can register devices at Profile > Devices > Register Device. Device attestation relies on platform-specific mechanisms:
Require additional authentication when the request context indicates elevated risk.
VeraID computes a real-time risk score (0-100) for each authentication attempt based on:
| Signal | Weight | Description |
|---|---|---|
| Unusual location | High | Login from a country or region the user has never accessed from |
| Impossible travel | High | Login from two geographically distant locations within a short time |
| Unknown device | Medium | Device not previously seen for this user |
| Tor/VPN exit node | Medium | IP address associated with anonymizing proxies |
| Failed login attempts | Medium | Multiple recent failed login attempts for this account |
| Off-hours access | Low | Login outside the user’s normal working hours |
| New application | Low | First time accessing this specific application |
{ "name": "Step-up MFA for high-risk logins", "priority": 5, "conditions": { "riskScore": { "min": 70 } }, "action": "require_mfa", "mfaRequirements": { "methods": ["webauthn", "totp"], "maxSessionAge": "15m" }}| Risk Level | Score Range | Default Action |
|---|---|---|
| Low | 0 - 30 | Allow |
| Medium | 31 - 69 | Allow (or require MFA, configurable) |
| High | 70 - 89 | Require step-up MFA |
| Critical | 90 - 100 | Deny (or require passkey + admin approval) |
Apply conditional access policies to specific OIDC clients or SAML service providers.
{ "name": "Restrict production API to platform team", "priority": 20, "conditions": { "applications": ["production-api"], "groups": { "exclude": ["platform-team", "sre-team"] } }, "action": "deny", "denyMessage": "Only platform and SRE team members can access the production API."}Group applications using tags and target policies at the tag level:
{ "conditions": { "applicationTags": ["tier-1", "production"], "deviceTrust": { "exclude": ["managed"] } }, "action": "require_mfa"}Test policies before enforcing them by running in dry-run mode. In dry-run mode, policies are evaluated but not enforced. The evaluation result is logged for analysis.
curl -X POST https://app.veraid.io/api/v1/conditional-access/policies \ -H "Authorization: Bearer kd_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "name": "Test: Require passkey for admin access", "priority": 8, "status": "dry_run", "conditions": { "roles": ["admin"], "applications": ["admin-dashboard"] }, "action": "require_mfa", "mfaRequirements": { "methods": ["webauthn"] } }'Dry-run evaluations appear in the audit log with the conditional_access.dry_run event type:
curl -X GET "https://app.veraid.io/api/v1/audit-logs?eventType=conditional_access.dry_run&policyId=pol_abc123" \ -H "Authorization: Bearer kd_live_your_api_key"Response:
{ "data": [ { "eventType": "conditional_access.dry_run", "timestamp": "2026-03-26T14:30:00Z", "policyId": "pol_abc123", "policyName": "Test: Require passkey for admin access", "userId": "usr_def456", "application": "admin-dashboard", "context": { "ipAddress": "203.0.113.42", "deviceTrust": "compliant", "riskScore": 15, "authMethod": "password_totp" }, "result": { "wouldHaveAction": "require_mfa", "wouldHaveRequired": ["webauthn"], "actualOutcome": "allowed" } } ]}Test a specific policy against a simulated request context without waiting for real traffic:
curl -X POST https://app.veraid.io/api/v1/conditional-access/simulate \ -H "Authorization: Bearer kd_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "userId": "usr_def456", "application": "admin-dashboard", "context": { "ipAddress": "203.0.113.42", "deviceTrust": "unknown", "riskScore": 45 } }'Response:
{ "evaluatedPolicies": [ { "policyId": "pol_abc123", "policyName": "Block access from untrusted networks", "matched": false, "reason": "IP 203.0.113.42 is within allowed range 203.0.113.0/24" }, { "policyId": "pol_def456", "policyName": "Require managed device for sensitive apps", "matched": true, "action": "deny", "reason": "Device trust 'unknown' is not in allowed set [managed, compliant]" } ], "finalAction": "deny", "denyMessage": "This application requires a managed or compliant device."}Policies are evaluated in ascending priority order (lower numbers = higher priority). The first matching policy determines the outcome.
| Priority | Policy | Action |
|---|---|---|
| 1 | Block known threat IPs | Deny |
| 5 | Step-up MFA for high-risk logins | Require MFA |
| 10 | Corporate network only for production | Deny |
| 15 | Managed device for sensitive apps | Deny |
| 20 | Platform team only for production API | Deny |
| 100 | Default allow | Allow |
If no policy matches, the default action applies (configurable under Settings > Conditional Access > Default Action).
Authentication Methods
Configure the authentication methods available for step-up MFA. Authentication Methods
Federation
Apply conditional access policies to federated login flows. Federation Guide
API Reference
Full API reference for conditional access endpoints. API Reference