Skip to main content

Cotool + OneLogin

Connect OneLogin to Cotool so agents look up users, read OneLogin events with IP and risk details, and end sessions or lock accounts with approval.

Identity & Access
Updated

The short answer

Cotool's OneLogin integration gives agents the directory side of an identity investigation: user records and lock state, the OneLogin event history with IP addresses and risk scores, and two containment steps, ending a OneLogin session or locking the account.[1][7][8][11][12]

How it connects: Cotool uses a OneLogin API credential pair: a client ID and client secret that the Generate Tokens API exchanges for an OAuth 2.0 bearer access token. The scope chosen for the credential decides which calls that token can make.[1][5][6]

What Cotool uses from OneLogin

Users
User records with status, state, locked_until, and last_login, searchable with filters such as last_login_since and last_login_until.[7]
Events
Account events filtered by event type ID, user, API client, and a since/until window. Each event carries fields such as the IP address, risk_score, and risk_reasons.[8]
Event types
Every event type available to the Events API, with its ID, name, and description, used to choose which event type IDs to filter on.[9]
Event webhook
OneLogin's Event Broadcaster sends batches of every event on the account in near real time to an endpoint you specify, which suits continuous log ingest.[10]

Response actions

These change state in OneLogin, so they are the steps teams usually gate behind approval.

End a OneLogin session
Logging a user out ends their OneLogin session, so they can no longer reach the portal or start new SAML or OpenID Connect sign-ins. Sessions already open in third-party apps stay active.[11]
Lock a user
Locks the account for a set number of minutes, for the lock period in the user's policy, or, when no policy applies, until an admin unlocks it.[12]

Detections, hunts, and triage

Review a risky sign-inTriage
For an identity alert, an agent pulls the user's recent OneLogin events and reads the IP address, risk score, and risk reasons on each to judge whether the sign-in fits the person's usual pattern.[8]
Contain a taken-over accountResponse
When an account looks compromised, a response agent proposes ending the OneLogin session or locking the user and waits for a person to approve. Because logout leaves third-party app sessions open, responders also revoke sessions in those apps.[2][3][11][12]
Sweep one event type across the accountHunt
A hunt picks an event type ID from the Event Types list and pulls every matching OneLogin event in a since/until window, then groups the results by user and IP address.[8][9]

Example query

List OneLogin events in a time windowhttp
GET https://<subdomain>.onelogin.com/api/1/events?since=2018-11-01T19:44:55.000Z&until=2018-11-02T19:44:55.000Z

OneLogin's example returns the events created between the since and until timestamps. Replace the subdomain and dates, and add event_type_id to narrow the results to specific event types.[8]

Setup and permissions

An account owner or administrator goes to Developers > API Credentials, clicks New Credential, names it, selects a scope, and copies the client ID and client secret.[5]

PermissionAccess
Read UsersGET calls on the User, Role, and Group resources, and one of the scopes that can call the Events API.[5][8]Read
Manage usersAdds POST, PUT, and DELETE calls on users and groups, which covers logging a user out.[5][11]Write
Manage AllThe only scope that can lock a user account. It also allows setting passwords and assigning roles.[5][12]Write
  • The Event Types endpoint is rate-limited, and OneLogin asks callers to cache its response for up to 24 hours.[9]
  • OneLogin has no API for creating the event webhook, so you add it under Developers > Webhooks in the admin portal. OneLogin recommends the JSON Array format and lets you set custom headers to verify that each request is genuine.[10]

How Cotool works with OneLogin

  • OneLogin is one of the identity integrations in Cotool's integrations catalog.[1]
  • Cotool can also be set up as an application in OneLogin, using SAML 2.0 for single sign-on and SCIM 2.0 for user provisioning.[4]
  • Release 0.79.0 added per-action approval controls for agent tools, with review in Cotool and optional requests through Slack or Microsoft Teams.[2]

FAQ

Does logging a user out of OneLogin end their sessions in other apps?
Logging a user out of OneLogin ends only the OneLogin session. The user can't open the portal or start new SAML or OpenID Connect sign-ins, but sessions already open in third-party apps stay active.[11]
Which OneLogin API scope does locking a user need?
Locking a OneLogin user needs a credential with the Manage All scope; no other scope can call that API. Logging a user out works with either Manage users or Manage All.[11][12]

Sources

  1. Integrations (Cotool) · accessed November 22, 2026
  2. Changelog (Cotool docs) · accessed November 22, 2026
  3. Respond to every signal (Cotool Respond) · accessed November 22, 2026
  4. SAML and SCIM IdP setup (Cotool docs) · accessed November 22, 2026
  5. Working with API Credentials (OneLogin Developers) · accessed November 22, 2026
  6. Generate Tokens (OneLogin Developers) · accessed November 22, 2026
  7. List Users (OneLogin Developers) · accessed November 22, 2026
  8. Get Events (OneLogin Developers) · accessed November 22, 2026
  9. Get Event Types (OneLogin Developers) · accessed November 22, 2026
  10. Event Webhooks (OneLogin Developers) · accessed November 22, 2026
  11. Log User Out (OneLogin Developers) · accessed November 22, 2026
  12. Lock User Account (OneLogin Developers) · accessed November 22, 2026

Related integrations

All integrations

Use cases with OneLogin

Related reading

Attackers are scaling with tokens

Cotool helps defenders operate at machine speed. See how security teams are scaling Detection & Response.

Book a demo