Note: This API is only available if you're subscribed to Okta Identity Governance or Secure Partner Access. Contact your Customer Success Manager or Account Executive for more information.
The Realm Assignments API provides operations to manage realm assignments. See Realm assignments and Manage realms.
Note: When you create realm assignments in bulk, realm assignment priorities must be unique.
Lists all realm assignments
OK
Forbidden
Too Many Requests
[- {
- "id": "rul2jy7jLUlnO3ng00g4",
- "status": "ACTIVE",
- "name": "Realm Assignment 1",
- "created": "2022-04-04T15:56:05.000Z",
- "lastUpdated": "2022-05-05T18:15:44.000Z",
- "isDefault": false,
- "domains": [
- "atko.com",
- "user.com"
], - "conditions": {
- "profileSourceId": "0oa4enoRyjwSCy5hx0g4",
- "expression": {
- "value": "user.profile.role ==\\\"Manager\\\""
}
}, - "actions": {
- "assignUserToRealm": {
- "realmId": "00g1b7rvh0xPLKXFf0g5"
}
}, - "priority": 0,
- "_links": {
- "self": {
- "rel": "self",
- "method": "GET"
}
}
}, - {
- "id": "rul2jy7jLUlnO5ng00g4",
- "status": "ACTIVE",
- "name": "Catch-all",
- "created": "2022-04-04T15:56:05.000Z",
- "lastUpdated": "2022-05-05T18:15:44.000Z",
- "isDefault": true,
- "domains": [
- "atko.com",
- "user.com"
], - "conditions": {
- "profileSourceId": "0oa4enoRyjwSCy6hx0g4,",
- "expression": {
- "value": "string"
}
}, - "actions": {
- "assignUserToRealm": {
- "realmId": "00g1b7rvh0xPLKXFf2g5"
}
}, - "priority": 499,
- "_links": {
- "self": {
- "rel": "self",
- "method": "GET"
}
}
}
]
Creates a new realm assignment
Created
Bad Request
Forbidden
Too Many Requests
{- "actions": {
- "assignUserToRealm": {
- "realmId": "00g1b7rvh0xPLKXFf0g5"
}
}, - "conditions": {
- "profileSourceId": "0oa4enoRyjwSCy5hx0g4",
- "expression": {
- "value": "user.profile.role ==\\\"Manager\\\""
}
}, - "name": "Realm Assignment 1",
- "priority": 0
}
{- "actions": {
- "assignUserToRealm": {
- "realmId": "string"
}
}, - "conditions": {
- "expression": {
- "value": "string"
}, - "profileSourceId": "string"
}, - "created": "2019-08-24T14:15:22Z",
- "domains": [ ],
- "id": "string",
- "isDefault": true,
- "lastUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "priority": 0,
- "status": "ACTIVE",
- "_links": {
- "self": {
- "hints": {
- "allow": [
- "DELETE"
]
}, - "href": "string",
- "name": "string",
- "templated": true,
- "type": "string"
}
}
}
Lists all realm assignment operations. The upper limit is 200 and operations are sorted in descending order from most recent to oldest by ID.
limit | integer [ 1 .. 200 ] Default: 20 A limit on the number of objects to return |
after | string The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the |
OK
Forbidden
Too Many Requests
[- {
- "id": "rre4mje4ez6B2a7B60g7",
- "type": "realm:assignment",
- "status": "COMPLETED",
- "created": "2023-10-25T21:02:54.000Z",
- "started": "2023-10-25T21:02:54.000Z",
- "completed": "2023-10-25T21:02:54.000Z",
- "realmId": "00g1b7rvh0xPLKXFf0g5",
- "realmName": "Realm Name",
- "assignmentOperation": {
- "configuration": {
- "id": "0pr1b7rxZj2ibQzfP0g5",
- "name": "Realm Assignment 1",
- "conditions": {
- "profileSourceId": "0oa4enoRyjwSCy5hx0g4",
- "expression": {
- "value": "string"
}
}, - "actions": {
- "assignUserToRealm": {
- "realmId": "00g1b7rvh0xPLKXFf0g5"
}
}
}
}, - "numUserMoved": 50,
- "_links": {
- "self": {
- "rel": "self",
- "method": "GET"
}
}
}, - {
- "id": "rre4mje4ez7B2a7B60g7",
- "type": "realm:assignment",
- "status": "COMPLETED",
- "created": "2023-10-25T21:02:54.000Z",
- "started": "2023-10-25T21:02:54.000Z",
- "completed": "2023-10-25T21:02:54.000Z",
- "assignmentOperation": {
- "configuration": {
- "id": "ALL",
- "name": "All Assignments"
}
}, - "numUserMoved": 50,
- "_links": {
- "self": {
- "rel": "self",
- "method": "GET"
}
}
}
]
Executes a realm assignment
Created
Bad Request
Forbidden
Too Many Requests
{- "assignmentId": "0pr1b7rxZj2ibQzfP0g5"
}
{- "id": "rre4mje4ez6B2a7B60g7",
- "type": "realm:assignment",
- "status": "COMPLETED",
- "created": "2023-10-25T21:02:54.000Z",
- "started": "2023-10-25T21:02:54.000Z",
- "completed": "2023-10-25T21:02:54.000Z",
- "realmId": "00g1b7rvh0xPLKXFf0g5",
- "realmName": "Realm Name",
- "assignmentOperation": {
- "configuration": {
- "id": "0pr1b7rxZj2ibQzfP0g5",
- "name": "Realm Assignment 1",
- "conditions": {
- "profileSourceId": "0oa4enoRyjwSCy5hx0g4",
- "expression": {
- "value": "string"
}
}, - "actions": {
- "assignUserToRealm": {
- "realmId": "00g1b7rvh0xPLKXFf0g5"
}
}
}
}, - "numUserMoved": 50,
- "_links": {
- "self": {
- "rel": "self",
- "method": "GET"
}
}
}
Retrieves a realm assignment
Success
Bad Request
Forbidden
Not Found
Too Many Requests
{- "id": "rul2jy7jLUlnO3ng00g4",
- "status": "ACTIVE",
- "name": "Realm Assignment 1",
- "created": "2022-04-04T15:56:05.000Z",
- "lastUpdated": "2022-05-05T18:15:44.000Z",
- "isDefault": false,
- "domains": [
- "atko.com",
- "user.com"
], - "conditions": {
- "profileSourceId": "0oa4enoRyjwSCy5hx0g4",
- "expression": {
- "value": "string"
}
}, - "actions": {
- "assignUserToRealm": {
- "realmId": "00g1b7rvh0xPLKXFf0g5"
}
}, - "priority": 0,
- "_links": {
- "self": {
- "rel": "self",
- "method": "GET"
}
}
}
Replaces a realm assignment
Success
Bad Request
Forbidden
Not Found
Too Many Requests
{- "actions": {
- "assignUserToRealm": {
- "realmId": "00g1b7rvh0xPLKXFf0g5"
}
}, - "conditions": {
- "profileSourceId": "0oa4enoRyjwSCy5hx0g4",
- "expression": {
- "value": "user.profile.role ==\\\"Manager\\\""
}
}, - "name": "Realm Assignment 1",
- "priority": 0
}
{- "actions": {
- "assignUserToRealm": {
- "realmId": "string"
}
}, - "conditions": {
- "expression": {
- "value": "string"
}, - "profileSourceId": "string"
}, - "created": "2019-08-24T14:15:22Z",
- "domains": [ ],
- "id": "string",
- "isDefault": true,
- "lastUpdated": "2019-08-24T14:15:22Z",
- "name": "string",
- "priority": 0,
- "status": "ACTIVE",
- "_links": {
- "self": {
- "hints": {
- "allow": [
- "DELETE"
]
}, - "href": "string",
- "name": "string",
- "templated": true,
- "type": "string"
}
}
}
Deletes a realm assignment
No Content
Bad Request
Forbidden
Not Found
Too Many Requests
{- "errorCauses": [
- {
- "errorSummary": "string"
}
], - "errorCode": "string",
- "errorId": "string",
- "errorLink": "string",
- "errorSummary": "string"
}
Activates a realm assignment
No Content
Bad Request
Forbidden
Not Found
Too Many Requests
{- "errorCode": "E0000001",
- "errorSummary": "Api validation failed: {0}",
- "errorLink": "E0000001",
- "errorId": "sampleiCF-8D5rLW6myqiPItW",
- "errorCauses": [ ]
}
Deactivates a realm assignment
No Content
Bad Request
Forbidden
Not Found
Too Many Requests
{- "errorCode": "E0000001",
- "errorSummary": "Api validation failed: {0}",
- "errorLink": "E0000001",
- "errorId": "sampleiCF-8D5rLW6myqiPItW",
- "errorCauses": [ ]
}