OneLogin

App · 25 actions

Manage OneLogin users and their roles: create, update, lock, sign out and delete users, assign roles and apps, and read apps, groups and the activity log.

Actions

ActionWhat it does
Add users to roleGive a role to one or more users.
Assign roles to userGive a user one or more roles, and with them the roles' apps.
Create roleCreate a role, optionally with apps, users and administrators.
Create userAdd a user to OneLogin.
Delete roleDelete a role.
Delete userDelete a user from OneLogin.
Get appGet an app: its connector, sign-in method, policy and roles.
Get roleGet a role, with the IDs of its apps, users and administrators.
Get userGet a user: their profile, status, roles, last sign-in and custom attributes.
List app usersList the users who have access to an app.
List appsList the apps set up in the account.
List event typesList every kind of event OneLogin records, with its ID and description.
List eventsList events from the account's activity log, newest first: sign-ins, password changes, app access and admin changes.
List groupsList the account's groups, which set the security policy for their users.
List role usersList the users who have a role.
List rolesList the account's roles, filtered by name or by an app they include.
List user's appsList the apps a user can use, with each one's provisioning state.
List usersList the account's users, filtered by name, email, when they were created or updated, or when they last signed in.
Lock userLock a user out of OneLogin for a number of minutes.
Remove roles from userTake one or more roles away from a user.
Remove users from roleTake a role away from one or more users.
Rename roleChange a role's name.
Set user stateApprove, reject or unlicense a user.
Sign user outEnd a user's OneLogin session, so they have to sign in again.
Update userChange a user's profile, status or state.

Add users to role

Give a role to one or more users.

Inputs

Rolerole_idnumberRequired
The role.At least 1.
Usersuser_idslistRequired
The users.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "done": true,
    "id": 1
  }
}

Assign roles to user

Give a user one or more roles, and with them the roles' apps.

Inputs

Useronelogin_user_idnumberRequired
The OneLogin user.At least 1.
Rolesrole_idslistRequired
The roles.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "done": true,
    "id": 1
  }
}

Create role

Create a role, optionally with apps, users and administrators.

Inputs

NamenametextRequired
The role's name.
Appsappslist
Apps the role gives access to.
Usersuserslist
Users to give the role.
Administratorsadminslist
Users who may manage the role.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "done": true,
    "id": 1
  }
}

Create user

Add a user to OneLogin. Give an email address, a username, or both.

Inputs

Emailemailtext
The user's email address.
Usernameusernametext
The user's username.
First namefirstnametext
The user's first name.
Last namelastnametext
The user's last name.
Job titletitletext
The user's job title.
Departmentdepartmenttext
The user's department.
Companycompanytext
The user's company.
Phonephonetext
The user's phone number, in E.164 format such as +14155550100.
Commentcommenttext
Free text about the user.
External IDexternal_idtext
The user's ID in another directory or system.
Managermanager_user_idtext
The OneLogin user ID of the user's manager.
Custom attributescustom_attributesobject
Values for the account's custom user fields, by their short names, such as {"employee_number": "1042"}.
Statestatenumber
Whether the user is approved to use OneLogin.One of: 0 (Unapproved), 1 (Approved), 2 (Rejected), 3 (Unlicensed).
Statusstatusnumber
The user's status: active, suspended, locked and so on.One of: 0 (Unactivated), 1 (Active), 2 (Suspended), 3 (Locked), 4 (Password expired), 5 (Awaiting password reset), 7 (Password pending), 8 (Security questions required).
Apply mappingsmappingstext
When OneLogin applies its user mappings to this change. OneLogin applies them in the background when this is empty.One of: async (Apply in the background), sync (Apply before answering), disabled (Don't apply).

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "activated_at": "example",
    "comment": "example",
    "company": "example",
    "created_at": "example",
    "custom_attributes": {},
    "department": "example",
    "directory_id": 1,
    "distinguished_name": "example",
    "email": "example",
    "external_id": "example",
    "firstname": "example",
    "group_id": 1,
    "id": 1,
    "invalid_login_attempts": 1,
    "invitation_sent_at": "example",
    "last_login": "example",
    "lastname": "example",
    "locked_until": "example",
    "manager_ad_id": "example",
    "manager_user_id": "example",
    "member_of": "example",
    "password_changed_at": "example",
    "phone": "example",
    "preferred_locale_code": "example",
    "role_ids": [
      1
    ],
    "samaccountname": "example",
    "state": 1,
    "status": 1,
    "title": "example",
    "trusted_idp_id": 1,
    "updated_at": "example",
    "username": "example",
    "userprincipalname": "example"
  }
}

Delete role

Delete a role. Its users lose the apps it gave them.

Inputs

Rolerole_idnumberRequired
The role.At least 1.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "done": true,
    "id": 1
  }
}

Delete user

Delete a user from OneLogin. This can't be undone.

Inputs

Useronelogin_user_idnumberRequired
The OneLogin user.At least 1.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "done": true,
    "id": 1
  }
}

Get app

Get an app: its connector, sign-in method, policy and roles.

Inputs

Appapp_idnumberRequired
The app.At least 1.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "allow_assumed_signin": true,
    "auth_method": 1,
    "connector_id": 1,
    "created_at": "example",
    "description": "example",
    "icon_url": "example",
    "id": 1,
    "name": "example",
    "notes": "example",
    "policy_id": 1,
    "role_ids": [
      1
    ],
    "tab_id": 1,
    "updated_at": "example",
    "visible": true
  }
}

Get role

Get a role, with the IDs of its apps, users and administrators.

Inputs

Rolerole_idnumberRequired
The role.At least 1.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "admins": [
      1
    ],
    "apps": [
      1
    ],
    "id": 1,
    "name": "example",
    "users": [
      1
    ]
  }
}

Get user

Get a user: their profile, status, roles, last sign-in and custom attributes.

Inputs

Useronelogin_user_idnumberRequired
The OneLogin user.At least 1.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "activated_at": "example",
    "comment": "example",
    "company": "example",
    "created_at": "example",
    "custom_attributes": {},
    "department": "example",
    "directory_id": 1,
    "distinguished_name": "example",
    "email": "example",
    "external_id": "example",
    "firstname": "example",
    "group_id": 1,
    "id": 1,
    "invalid_login_attempts": 1,
    "invitation_sent_at": "example",
    "last_login": "example",
    "lastname": "example",
    "locked_until": "example",
    "manager_ad_id": "example",
    "manager_user_id": "example",
    "member_of": "example",
    "password_changed_at": "example",
    "phone": "example",
    "preferred_locale_code": "example",
    "role_ids": [
      1
    ],
    "samaccountname": "example",
    "state": 1,
    "status": 1,
    "title": "example",
    "trusted_idp_id": 1,
    "updated_at": "example",
    "username": "example",
    "userprincipalname": "example"
  }
}

List app users

List the users who have access to an app.

Inputs

Appapp_idnumberRequired
The app.At least 1.
Pagepagenumber
Which page of results to return, starting at 1.At least 1.
Limitlimitnumber
How many records to return, up to 100.From 1 to 100.

Outputs

datalist
The response from OneLogin.
Example output
{
  "data": [
    {
      "email": "example",
      "firstname": "example",
      "id": 1,
      "lastname": "example",
      "username": "example"
    }
  ]
}

List apps

List the apps set up in the account.

Inputs

Namenametext
Only apps whose name contains this.
Connector IDconnector_idnumber
Only apps built on this connector.At least 1.
Pagepagenumber
Which page of results to return, starting at 1.At least 1.
Limitlimitnumber
How many records to return, up to 100.From 1 to 100.

Outputs

datalist
The response from OneLogin.
Example output
{
  "data": [
    {
      "allow_assumed_signin": true,
      "auth_method": 1,
      "connector_id": 1,
      "created_at": "example",
      "description": "example",
      "icon_url": "example",
      "id": 1,
      "name": "example",
      "notes": "example",
      "policy_id": 1,
      "role_ids": [
        1
      ],
      "tab_id": 1,
      "updated_at": "example",
      "visible": true
    }
  ]
}

List event types

List every kind of event OneLogin records, with its ID and description.

Inputs

None.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "data": [
      {
        "description": "example",
        "id": 1,
        "name": "example"
      }
    ],
    "status": {
      "code": 1,
      "error": true,
      "message": "example",
      "type": "example"
    }
  }
}

List events

List events from the account's activity log, newest first: sign-ins, password changes, app access and admin changes.

Inputs

Event typesevent_type_idlist
Only events of these types.
Useronelogin_user_idnumber
Only events about this user.At least 1.
Aftersincedate and time
Only events after this time.
Beforeuntildate and time
Only events before this time.
Limitlimitnumber
How many events to return, up to 50.From 1 to 50.
Next page cursorafter_cursortext
The cursor from a previous page's pagination, to read the next page.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "data": [
      {
        "account_id": 1,
        "actor_system": "example",
        "actor_user_id": 1,
        "actor_user_name": "example",
        "app_id": 1,
        "app_name": "example",
        "created_at": "example",
        "custom_message": "example",
        "directory_id": 1,
        "error_description": "example",
        "event_type_id": 1,
        "group_id": 1,
        "group_name": "example",
        "id": 1,
        "ipaddr": "example",
        "notes": "example",
        "otp_device_id": 1,
        "otp_device_name": "example",
        "policy_id": 1,
        "policy_name": "example",
        "risk_reasons": "example",
        "risk_score": 1,
        "role_id": 1,
        "role_name": "example",
        "user_id": 1,
        "user_name": "example"
      }
    ],
    "pagination": {
      "after_cursor": "example",
      "before_cursor": "example",
      "next_link": "example",
      "previous_link": "example"
    },
    "status": {
      "code": 1,
      "error": true,
      "message": "example",
      "type": "example"
    }
  }
}

List groups

List the account's groups, which set the security policy for their users.

Inputs

None.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "data": [
      {
        "id": 1,
        "name": "example",
        "reference": "example"
      }
    ],
    "status": {
      "code": 1,
      "error": true,
      "message": "example",
      "type": "example"
    }
  }
}

List role users

List the users who have a role.

Inputs

Rolerole_idnumberRequired
The role.At least 1.
Searchnametext
Only users whose name, username or email contains this.
Include users without the roleinclude_unassignedtrue/false
Also list users who don't have the role.
Pagepagenumber
Which page of results to return, starting at 1.At least 1.
Limitlimitnumber
How many records to return, up to 100.From 1 to 100.

Outputs

datalist
The response from OneLogin.
Example output
{
  "data": [
    {
      "assigned": true,
      "email": "example",
      "id": 1,
      "name": "example",
      "username": "example"
    }
  ]
}

List roles

List the account's roles, filtered by name or by an app they include.

Inputs

Namenametext
Only roles with this name.
Appapp_idnumber
Only roles that include this app.At least 1.
App nameapp_nametext
Only roles that include an app with this name.
Pagepagenumber
Which page of results to return, starting at 1.At least 1.
Limitlimitnumber
How many records to return, up to 100.From 1 to 100.

Outputs

datalist
The response from OneLogin.
Example output
{
  "data": [
    {
      "admins": [
        1
      ],
      "apps": [
        1
      ],
      "id": 1,
      "name": "example",
      "users": [
        1
      ]
    }
  ]
}

List user's apps

List the apps a user can use, with each one's provisioning state.

Inputs

Useronelogin_user_idnumberRequired
The OneLogin user.At least 1.
Include hidden appsignore_visibilitytrue/false
Include apps hidden from the user's portal.

Outputs

datalist
The response from OneLogin.
Example output
{
  "data": [
    {
      "extension": true,
      "icon_url": "example",
      "id": 1,
      "login_id": 1,
      "name": "example",
      "provisioning_enabled": true,
      "provisioning_state": "example",
      "provisioning_status": "example"
    }
  ]
}

List users

List the account's users, filtered by name, email, when they were created or updated, or when they last signed in.

Inputs

Emailemailtext
Only the user with this email address.
Usernameusernametext
Only the user with this username.
First namefirstnametext
Only users with this first name.
Last namelastnametext
Only users with this last name.
External IDexternal_idtext
Only the user with this external ID.
Directory IDdirectory_idnumber
Only users from this directory.At least 1.
Created aftercreated_sincedate and time
Only users created after this time.
Created beforecreated_untildate and time
Only users created before this time.
Updated afterupdated_sincedate and time
Only users updated after this time.
Updated beforeupdated_untildate and time
Only users updated before this time.
Last signed in afterlast_login_sincedate and time
Only users who last signed in after this time.
Last signed in beforelast_login_untildate and time
Only users who last signed in before this time.
Pagepagenumber
Which page of results to return, starting at 1.At least 1.
Limitlimitnumber
How many records to return, up to 100.From 1 to 100.

Outputs

datalist
The response from OneLogin.
Example output
{
  "data": [
    {
      "activated_at": "example",
      "comment": "example",
      "company": "example",
      "created_at": "example",
      "custom_attributes": {},
      "department": "example",
      "directory_id": 1,
      "distinguished_name": "example",
      "email": "example",
      "external_id": "example",
      "firstname": "example",
      "group_id": 1,
      "id": 1,
      "invalid_login_attempts": 1,
      "invitation_sent_at": "example",
      "last_login": "example",
      "lastname": "example",
      "locked_until": "example",
      "manager_ad_id": "example",
      "manager_user_id": "example",
      "member_of": "example",
      "password_changed_at": "example",
      "phone": "example",
      "preferred_locale_code": "example",
      "role_ids": [
        1
      ],
      "samaccountname": "example",
      "state": 1,
      "status": 1,
      "title": "example",
      "trusted_idp_id": 1,
      "updated_at": "example",
      "username": "example",
      "userprincipalname": "example"
    }
  ]
}

Lock user

Lock a user out of OneLogin for a number of minutes. Set the user's status to Active with Update user to unlock them sooner.

Inputs

Useronelogin_user_idnumberRequired
The OneLogin user.At least 1.
Minuteslocked_untilnumberRequired
How many minutes to lock the account for. 0 locks it for the time the user's policy sets, or until it is unlocked if no policy applies.At least 0.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "done": true,
    "id": 1
  }
}

Remove roles from user

Take one or more roles away from a user.

Inputs

Useronelogin_user_idnumberRequired
The OneLogin user.At least 1.
Rolesrole_idslistRequired
The roles.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "done": true,
    "id": 1
  }
}

Remove users from role

Take a role away from one or more users.

Inputs

Rolerole_idnumberRequired
The role.At least 1.
Usersuser_idslistRequired
The users.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "done": true,
    "id": 1
  }
}

Rename role

Change a role's name.

Inputs

Rolerole_idnumberRequired
The role.At least 1.
NamenametextRequired
The role's new name.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "done": true,
    "id": 1
  }
}

Set user state

Approve, reject or unlicense a user.

Inputs

Useronelogin_user_idnumberRequired
The OneLogin user.At least 1.
StatestatenumberRequired
Whether the user is approved to use OneLogin.One of: 0 (Unapproved), 1 (Approved), 2 (Rejected), 3 (Unlicensed).

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "done": true,
    "id": 1
  }
}

Sign user out

End a user's OneLogin session, so they have to sign in again.

Inputs

Useronelogin_user_idnumberRequired
The OneLogin user.At least 1.

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "done": true,
    "id": 1
  }
}

Update user

Change a user's profile, status or state. Set the status to Active to unlock or reactivate someone, or to Suspended to stop them signing in. Empty fields are left as they are.

Inputs

Useronelogin_user_idnumberRequired
The OneLogin user.At least 1.
Emailemailtext
The user's email address.
Usernameusernametext
The user's username.
First namefirstnametext
The user's first name.
Last namelastnametext
The user's last name.
Job titletitletext
The user's job title.
Departmentdepartmenttext
The user's department.
Companycompanytext
The user's company.
Phonephonetext
The user's phone number, in E.164 format such as +14155550100.
Commentcommenttext
Free text about the user.
External IDexternal_idtext
The user's ID in another directory or system.
Managermanager_user_idtext
The OneLogin user ID of the user's manager.
Custom attributescustom_attributesobject
Values for the account's custom user fields, by their short names, such as {"employee_number": "1042"}.
Statestatenumber
Whether the user is approved to use OneLogin.One of: 0 (Unapproved), 1 (Approved), 2 (Rejected), 3 (Unlicensed).
Statusstatusnumber
The user's status: active, suspended, locked and so on.One of: 0 (Unactivated), 1 (Active), 2 (Suspended), 3 (Locked), 4 (Password expired), 5 (Awaiting password reset), 7 (Password pending), 8 (Security questions required).
Apply mappingsmappingstext
When OneLogin applies its user mappings to this change. OneLogin applies them in the background when this is empty.One of: async (Apply in the background), sync (Apply before answering), disabled (Don't apply).

Outputs

dataobject
The response from OneLogin.
Example output
{
  "data": {
    "activated_at": "example",
    "comment": "example",
    "company": "example",
    "created_at": "example",
    "custom_attributes": {},
    "department": "example",
    "directory_id": 1,
    "distinguished_name": "example",
    "email": "example",
    "external_id": "example",
    "firstname": "example",
    "group_id": 1,
    "id": 1,
    "invalid_login_attempts": 1,
    "invitation_sent_at": "example",
    "last_login": "example",
    "lastname": "example",
    "locked_until": "example",
    "manager_ad_id": "example",
    "manager_user_id": "example",
    "member_of": "example",
    "password_changed_at": "example",
    "phone": "example",
    "preferred_locale_code": "example",
    "role_ids": [
      1
    ],
    "samaccountname": "example",
    "state": 1,
    "status": 1,
    "title": "example",
    "trusted_idp_id": 1,
    "updated_at": "example",
    "username": "example",
    "userprincipalname": "example"
  }
}

On this page