Skip to main content

Overview

SSO audit logging provides comprehensive tracking of all authentication-related events, configuration changes, and user activity. This enables security monitoring, compliance reporting, troubleshooting, and forensic analysis.

Accessing audit logs

Navigate to the audit logs page in your admin dashboard:
https://your-domain.com/admin/audit-logs

Event types

Authentication events

Event TypeDescriptionSeverity
auth.login.successSuccessful SSO loginInfo
auth.login.failedFailed login attemptWarning
auth.logoutUser logout (including RP-initiated)Info
auth.token.issuedAccess token issuedInfo
auth.token.refreshedAccess token refreshedInfo
auth.token.revokedAccess token revokedWarning
auth.session.expiredUser session expiredInfo

Provider configuration events

Event TypeDescriptionSeverity
provider.createdNew SSO provider addedInfo
provider.updatedProvider configuration changedInfo
provider.deletedProvider removedWarning
provider.enabledProvider enabledInfo
provider.disabledProvider disabledWarning
provider.testProvider test login performedInfo

User account events

Event TypeDescriptionSeverity
user.createdNew user account created via JIT provisioningInfo
user.updatedUser profile updatedInfo
user.suspendedUser account suspendedWarning
user.reactivatedSuspended user reactivatedInfo
user.deletedUser account deletedWarning
user.roles.syncedUser roles synchronized from IdPInfo
user.roles.updatedUser roles manually updatedInfo

Connected account events

Event TypeDescriptionSeverity
account.connectedSSO account connected to userInfo
account.disconnectedSSO account disconnectedWarning
account.linkedMultiple SSO accounts linkedInfo
account.unlinkedSSO accounts unlinkedWarning

Log entry details

Each audit log entry contains:

Core fields

FieldDescription
TimestampWhen the event occurred (UTC)
Event typeType of event (see event types above)
SeverityInfo, Warning, Error, or Critical
UserUser who triggered the event (if applicable)
IP addressSource IP address
User agentBrowser/client information

Event-specific data

FieldDescription
ProviderSSO provider involved
ActionSpecific action performed
ResourceResource affected (user, provider, etc.)
ChangesWhat changed (for update events)
Error messageError details (for failed events)
Session IDSession identifier
Request IDUnique request identifier for correlation

Example log entries

Successful login

{
  "timestamp": "2024-01-15T10:30:45.123Z",
  "eventType": "auth.login.success",
  "severity": "info",
  "user": {
    "id": "user_123",
    "email": "[email protected]"
  },
  "provider": "google",
  "ipAddress": "203.0.113.42",
  "userAgent": "Mozilla/5.0...",
  "sessionId": "sess_abc123",
  "requestId": "req_xyz789"
}

Failed login attempt

{
  "timestamp": "2024-01-15T10:32:15.456Z",
  "eventType": "auth.login.failed",
  "severity": "warning",
  "provider": "okta",
  "ipAddress": "203.0.113.42",
  "userAgent": "Mozilla/5.0...",
  "error": "Invalid credentials",
  "requestId": "req_abc456"
}

Provider configuration change

{
  "timestamp": "2024-01-15T09:15:30.789Z",
  "eventType": "provider.updated",
  "severity": "info",
  "user": {
    "id": "admin_456",
    "email": "[email protected]"
  },
  "provider": "azure",
  "changes": {
    "scopes": {
      "old": "openid profile email",
      "new": "openid profile email groups"
    }
  },
  "ipAddress": "203.0.113.10",
  "requestId": "req_def789"
}

Search capabilities

Search audit logs using various criteria:
  • Text search: Search across all text fields
  • User: Filter by specific user
  • Provider: Filter by SSO provider
  • Event type: Filter by event type
  • Severity: Filter by severity level
  • Date range: Filter by time period
  • IP address: Filter by source IP

Advanced filters

Combine multiple filters for precise queries:
Event type: auth.login.failed
Provider: okta
Date range: Last 7 days
IP address: 203.0.113.*

Saved searches

Save frequently used search queries:
1

Create search

Configure your search filters
2

Click save search

Click “Save Search” button
3

Name the search

Enter a descriptive name (e.g., “Failed Okta logins”)
4

Access saved searches

Access from the “Saved Searches” dropdown

Monitoring and alerts

Real-time monitoring

Monitor authentication events in real-time:
  • Live event stream
  • Auto-refresh every 30 seconds
  • Desktop notifications for critical events
  • Sound alerts for security events

Alert configuration

Set up alerts for specific events:
1

Navigate to alerts

Go to Admin → Audit Logs → Alerts
2

Create alert

Click “Create Alert”
3

Configure conditions

Set alert conditions:
  • Event type
  • Severity level
  • Frequency threshold
  • Time window
4

Configure notifications

Choose notification methods:
  • Email
  • Slack
  • Webhook
  • SMS (if configured)
5

Save alert

Save and enable the alert

Example alerts

Multiple failed login attempts

Alert: Failed login threshold
Condition: 5 or more failed logins from same IP in 10 minutes
Notification: Email to security team

Provider configuration changes

Alert: Provider modified
Condition: Any provider.updated or provider.deleted event
Notification: Slack channel #security-alerts

Suspicious activity

Alert: Unusual login location
Condition: Login from new country/region
Notification: Email to user and security team

Compliance and reporting

Compliance reports

Generate reports for compliance requirements:

SOC 2 authentication report

  • All authentication events
  • Failed login attempts
  • Account changes
  • Provider configuration changes

GDPR user activity report

  • All events for a specific user
  • Account creation and deletion
  • Data access events
  • Consent changes

HIPAA access audit

  • User authentication events
  • Role changes
  • Access to sensitive resources
  • Failed access attempts

Generating reports

1

Navigate to reports

Go to Admin → Audit Logs → Reports
2

Select report type

Choose a compliance report template or create custom
3

Configure parameters

Set date range, users, providers, etc.
4

Generate report

Click “Generate Report”
5

Export report

Download as PDF, CSV, or JSON

Log retention

Retention policies

Configure how long audit logs are retained:
TierRetention PeriodStorage
Standard90 daysDatabase
Extended1 yearDatabase + Archive
Compliance7 yearsArchive storage

Archiving

Older logs are automatically archived:
  • Compressed and stored in archive storage
  • Searchable through archive interface
  • Can be restored for investigation
  • Compliant with data retention regulations

Export for long-term storage

Export logs for external archiving:
1

Navigate to export

Go to Admin → Audit Logs → Export
2

Select date range

Choose the time period to export
3

Choose format

Select JSON, CSV, or JSONL format
4

Download archive

Download the compressed archive file

Security monitoring use cases

Detecting brute force attacks

Monitor for multiple failed login attempts:
Filter: auth.login.failed
Group by: IP address
Threshold: 10+ attempts in 5 minutes

Identifying compromised accounts

Look for unusual login patterns:
  • Logins from new locations
  • Logins at unusual times
  • Multiple concurrent sessions
  • Rapid provider switching

Tracking privilege escalation

Monitor role changes:
Filter: user.roles.updated
Alert: When admin role is assigned
Review: Manual role changes

Detecting configuration tampering

Track provider configuration changes:
Filter: provider.updated OR provider.deleted
Alert: Any configuration change
Review: Who made the change and what changed

Troubleshooting with audit logs

Debugging authentication failures

1

Search for user

Filter logs by user email or ID
2

Find failed events

Look for auth.login.failed events
3

Review error messages

Check the error field for specific failure reasons
4

Check provider logs

Review provider-specific events around the same time
5

Verify configuration

Ensure provider configuration hasn’t changed

Investigating role issues

1

Search for user

Filter logs by user email or ID
2

Find role events

Look for user.roles.synced and user.roles.updated events
3

Review changes

Check what roles were added or removed
4

Check group mappings

Verify group-to-role mapping configuration
5

Review IdP groups

Check what groups the IdP is sending

API access to audit logs

REST API

Access audit logs programmatically:
GET /api/v1/audit-logs
Authorization: Bearer <token>

Query parameters:
- startDate: ISO 8601 timestamp
- endDate: ISO 8601 timestamp
- eventType: Event type filter
- userId: User ID filter
- provider: Provider ID filter
- limit: Results per page (max 100)
- offset: Pagination offset

Webhook integration

Stream audit events to external systems:
1

Configure webhook

Go to Admin → Audit Logs → Webhooks
2

Add endpoint

Enter your webhook URL
3

Select events

Choose which event types to send
4

Configure authentication

Set up webhook authentication (HMAC signature)
5

Test webhook

Send a test event to verify configuration

SIEM integration

Integrate with Security Information and Event Management systems:
  • Splunk
  • Datadog
  • Elastic Stack
  • Azure Sentinel
  • AWS CloudWatch

Best practices

Review audit logs regularly (daily or weekly) to identify patterns and anomalies.
Configure alerts for critical security events to enable rapid response.
Follow your organization’s retention policies and compliance requirements.
Restrict audit log access to authorized administrators only.
Export logs to external storage for long-term retention and disaster recovery.
Use request IDs to correlate related events across the authentication flow.

Next steps