Get a list of provisioned identities

GET /scim/v2/organizations/:org/Users

Parameters

Name Type Description
startIndex integer Used for pagination: the index of the first result to return.
count integer Used for pagination: the number of results to return.
filter string Filters results using the equals query parameter operator (eq). You can filter results that are equal to id, userName, emails, and external_id. For example, to search for an identity with the userName Octocat, you would use this query: ?filter=userName%20eq%20\"Octocat\".

Example

To filter for a specific email address, use the email query parameter and the eq operator:

GET /scim/v2/organizations/:org/Users?filter=emails eq user@example.com

Your filter would look like this cURL command:

curl -u octocat:$token https://api.github.com/scim/v2/organizations/octo-org/Users?filter=emails%20eq%20\"octocat@github.com\"

Response with filter

Retrieves users that match the filter. In the example, we searched only for octocat@github.com.

Status: 200 OK
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults": 1,
  "itemsPerPage": 1,
  "startIndex": 1,
  "Resources": [
    {
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User"
      ],
      "id": "5fc0c238-1112-11e8-8e45-920c87bdbd75",
      "externalId": "00u1dhhb1fkIGP7RL1d8",
      "userName": "octocat@github.com",
      "name": {
        "givenName": "Mona",
        "familyName": "Octocat"
      },
      "emails": [
        {
          "value": "octocat@github.com",
          "primary": true,
          "type": "work"
        }
      ],
      "active": true,
      "meta": {
        "resourceType": "User",
        "created": "2018-02-13T15:05:24.000-08:00",
        "lastModified": "2018-02-13T15:05:55.000-08:00",
        "location": "https://api.github.com/scim/v2/organizations/octo-org/Users/5fc0c238-1112-11e8-8e45-920c87bdbd75"
      }
    }
  ]
}

Response without filter

Retrieves a paginated list of all provisioned organization members, including pending invitations.

Status: 200 OK
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults": 2,
  "itemsPerPage": 2,
  "startIndex": 1,
  "Resources": [
    {
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User"
      ],
      "id": "edefdfedf-050c-11e7-8d32",
      "externalId": "a7d0f98382",
      "userName": "mona.octocat@okta.example.com",
      "name": {
        "givenName": "Mona",
        "familyName": "Octocat"
      },
      "emails": [
        {
          "value": "mona.octocat@okta.example.com",
          "type": "work",
          "primary": true
        }
      ],
      "active": true,
      "meta": {
        "resourceType": "User",
        "created": "2017-03-09T16:11:13-05:00",
        "lastModified": "2017-03-09T16:11:13-05:00",
        "location": "https://api.github.com/scim/v2/organizations/octo-org/Users/edefdfedf-050c-11e7-8d32"
      }
    },
    {
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User"
      ],
      "id": "77563764-eb6-24-0598234-958243",
      "externalId": "sdfoiausdofiua",
      "userName": "hubot@example.com",
      "name": {
        "givenName": "hu",
        "familyName": "bot"
      },
      "emails": [
        {
          "value": "hubot@example.com",
          "type": "work",
          "primary": true
        }
      ],
      "active": true,
      "meta": {
        "resourceType": "User",
        "created": "2017-03-09T16:11:13-05:00",
        "lastModified": "2017-03-09T16:11:13-05:00",
        "location": "https://api.github.com/scim/v2/organizations/octo-org/Users/77563764-eb6-24-0598234-958243"
      }
    }
  ]
}