GET

Get Security Policies

Gets a list of Security Policies in your account.

The list response returns only the brief attribute set — id, name, kind, and is_default. The full attribute set is returned only by Get Security Policy by ID, Create, Update, and Set Default.

Resource URL

https://<subdomain>.onelogin.com/api/2/policies

Header Parameters

ParameterDescription
Authorizationbearer:<access_token>. Requires a scope of Manage All or Read All.
Content-Typeapplication/json

Sample Responses

200 Success

{
  "status": {
    "error": false,
    "code": 200,
    "type": "success",
    "message": "Success"
  },
  "data": [
    {
      "id": 1,
      "name": "Default Policy",
      "kind": "user",
      "is_default": true
    },
    {
      "id": 2,
      "name": "App Policy - Salesforce",
      "kind": "app",
      "is_default": false
    }
  ]
}

Postman Collection

Add the Security Policies endpoints to your Postman workspace using the OneLogin Postman collection.

Sample Code

curl -X GET \
  https://<subdomain>.onelogin.com/api/2/policies \
  -H 'Authorization: bearer:<access_token>' \
  -H 'Content-Type: application/json'