Identity Sources

The Okta Identity Source API provides a mechanism to synchronize an HR source (the custom identity source) with Okta user profiles in an org.

List all Identity Source Sessions
OAuth 2.0: okta.identitySources.read

Lists all Identity Source Sessions for the given Identity Source instance

Request
path Parameters
identitySourceId
required
string

The ID of the Identity Source for which the session is created

Example: 0oa3l6l6WK6h0R0QW0g4
Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

get/api/v1/identity-sources/{identitySourceId}/sessions
Request samples
Response samples
application/json
[
  • {
    • "id": "aps1qqonvr2SZv6o70h8",
    • "identitySourceId": "0oa3l6l6WK6h0R0QW0g4",
    • "status": "CREATED",
    • "importType": "INCREMENTAL",
    • "created": "2022-04-04T15:56:05.000Z",
    • "lastUpdated": "2022-05-05T16:15:44.000Z"
    },
  • {
    • "id": "aps1quck606ngubVq0h8",
    • "identitySourceId": "0oa3l6l6WK6h0R0QW0g4",
    • "status": "TRIGGERED",
    • "importType": "INCREMENTAL",
    • "created": "2022-04-04T16:56:05.000Z",
    • "lastUpdated": "2022-05-05T17:15:44.000Z"
    },
  • {
    • "id": "aps1qzy2acb5jDlUc0h8",
    • "identitySourceId": "0oa3l6l6WK6h0R0QW0g4",
    • "status": "IN_PROGRESS",
    • "importType": "INCREMENTAL",
    • "created": "2022-04-04T17:56:05.000Z",
    • "lastUpdated": "2022-05-05T18:15:44.000Z"
    },
  • {
    • "id": "aps1qqne8c1JHkMdF0h8",
    • "identitySourceId": "0oa3l6l6WK6h0R0QW0g4",
    • "status": "EXPIRED",
    • "importType": "INCREMENTAL",
    • "created": "2022-04-04T18:56:05.000Z",
    • "lastUpdated": "2022-05-05T19:15:44.000Z"
    },
  • {
    • "id": "aps1qqonvr2SZv6o70h8",
    • "identitySourceId": "0oa3l6l6WK6h0R0QW0g4",
    • "status": "CLOSED",
    • "importType": "INCREMENTAL",
    • "created": "2022-04-04T19:56:05.000Z",
    • "lastUpdated": "2022-05-05T20:15:44.000Z"
    }
]

Create an Identity Source Session
OAuth 2.0: okta.identitySources.manage

Creates an Identity Source Session for the given Identity Source instance

Request
path Parameters
identitySourceId
required
string

The ID of the Identity Source for which the session is created

Example: 0oa3l6l6WK6h0R0QW0g4
Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

post/api/v1/identity-sources/{identitySourceId}/sessions
Request samples
Response samples
application/json
{
  • "id": "aps1qqonvr2SZv6o70h8",
  • "identitySourceId": "0oa3l6l6WK6h0R0QW0g4",
  • "status": "CREATED",
  • "importType": "INCREMENTAL",
  • "created": "2022-04-04T15:56:05.000Z",
  • "lastUpdated": "2022-05-05T16:15:44.000Z"
}

Retrieve an Identity Source Session
OAuth 2.0: okta.identitySources.read

Retrieves an Identity Source Session for a given Identity Source ID and session ID

Request
path Parameters
identitySourceId
required
string

The ID of the Identity Source for which the session is created

Example: 0oa3l6l6WK6h0R0QW0g4
sessionId
required
string

The ID of the Identity Source Session

Example: aps1qqonvr2SZv6o70h8
Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

get/api/v1/identity-sources/{identitySourceId}/sessions/{sessionId}
Request samples
Response samples
application/json
{
  • "id": "aps1qqonvr2SZv6o70h8",
  • "identitySourceId": "0oa3l6l6WK6h0R0QW0g4",
  • "status": "CREATED",
  • "importType": "INCREMENTAL",
  • "created": "2022-04-04T15:56:05.000Z",
  • "lastUpdated": "2022-05-05T16:15:44.000Z"
}

Delete an Identity Source Session
OAuth 2.0: okta.identitySources.manage

Deletes an Identity Source Session for a given identitySourceId and sessionId

Request
path Parameters
identitySourceId
required
string

The ID of the Identity Source for which the session is created

Example: 0oa3l6l6WK6h0R0QW0g4
sessionId
required
string

The ID of the Identity Source Session

Example: aps1qqonvr2SZv6o70h8
Responses
204

No Content

403

Forbidden

404

Not Found

429

Too Many Requests

delete/api/v1/identity-sources/{identitySourceId}/sessions/{sessionId}
Request samples
Response samples
application/json
{
  • "errorCode": "E0000006",
  • "errorSummary": "You do not have permission to perform the requested action",
  • "errorLink": "E0000006",
  • "errorId": "sampleNUSD_8fdkFd8fs8SDBK",
  • "errorCauses": [ ]
}

Upload the data to be deleted in Okta
OAuth 2.0: okta.identitySources.manage

Uploads external IDs of entities that need to be deleted in Okta from the Identity Source for the given session

Request
path Parameters
identitySourceId
required
string

The ID of the Identity Source for which the session is created

Example: 0oa3l6l6WK6h0R0QW0g4
sessionId
required
string

The ID of the Identity Source Session

Example: aps1qqonvr2SZv6o70h8
Request Body schema: application/json
entityType
string
Value: "USERS"
Array of objects (IdentitySourceUserProfileForDelete)
Array
externalId
string <= 512 characters

The external ID of the entity that needs to be deleted in Okta

Responses
202

Accepted

400

Bad Request

403

Forbidden

404

Not Found

429

Too Many Requests

post/api/v1/identity-sources/{identitySourceId}/sessions/{sessionId}/bulk-delete
Request samples
application/json
{
  • "entityType": "USERS",
  • "profiles": [
    • {
      },
    • {
      },
    • {
      }
    ]
}
Response samples
application/json
{
  • "errorCode": "E0000001",
  • "errorSummary": "Api validation failed: {0}",
  • "errorLink": "E0000001",
  • "errorId": "sampleiCF-8D5rLW6myqiPItW",
  • "errorCauses": [ ]
}

Upload the data to be upserted in Okta
OAuth 2.0: okta.identitySources.manage

Uploads entities that need to be inserted or updated in Okta from the Identity Source for the given session

Request
path Parameters
identitySourceId
required
string

The ID of the Identity Source for which the session is created

Example: 0oa3l6l6WK6h0R0QW0g4
sessionId
required
string

The ID of the Identity Source Session

Example: aps1qqonvr2SZv6o70h8
Request Body schema: application/json
entityType
string
Value: "USERS"
Array of objects
Array
externalId
string <= 512 characters

The external ID of the entity that needs to be created or updated in Okta

object (IdentitySourceUserProfileForUpsert)
Responses
202

Accepted

400

Bad Request

403

Forbidden

404

Not Found

429

Too Many Requests

post/api/v1/identity-sources/{identitySourceId}/sessions/{sessionId}/bulk-upsert
Request samples
application/json
{
  • "entityType": "USERS",
  • "profiles": [
    • {
      }
    ]
}
Response samples
application/json
{
  • "errorCode": "E0000001",
  • "errorSummary": "Api validation failed: {0}",
  • "errorLink": "E0000001",
  • "errorId": "sampleiCF-8D5rLW6myqiPItW",
  • "errorCauses": [ ]
}

Start the import from the Identity Source
OAuth 2.0: okta.identitySources.manage

Starts the import from the Identity Source described by the uploaded bulk operations

Request
path Parameters
identitySourceId
required
string

The ID of the Identity Source for which the session is created

Example: 0oa3l6l6WK6h0R0QW0g4
sessionId
required
string

The ID of the Identity Source Session

Example: aps1qqonvr2SZv6o70h8
Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

post/api/v1/identity-sources/{identitySourceId}/sessions/{sessionId}/start-import
Request samples
Response samples
application/json
[
  • {
    • "id": "aps1qqonvr2SZv6o70h8",
    • "identitySourceId": "0oa3l6l6WK6h0R0QW0g4",
    • "status": "TRIGGERED",
    • "importType": "INCREMENTAL",
    • "created": "2022-04-04T15:56:05.000Z",
    • "lastUpdated": "2022-05-05T18:15:44.000Z"
    }
]