Authorization Server Policies

Provides operations to manage policies for the given authServerId.

List all Policies
API Access Management
OAuth 2.0: okta.authorizationServers.read

Lists all policies

Request
path Parameters
authServerId
required
string

id of the Authorization Server

Example: GeGRTEr7f3yu2n7grw22
Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

get/api/v1/authorizationServers/{authServerId}/policies
Request samples
Response samples
application/json
[]

Create a Policy
API Access Management
OAuth 2.0: okta.authorizationServers.manage

Creates a policy

Request
path Parameters
authServerId
required
string

id of the Authorization Server

Example: GeGRTEr7f3yu2n7grw22
Request Body schema: application/json
required
id
string

ID of the Policy

type
string

Indicates that the Policy is an authorization server Policy

Value: "OAUTH_AUTHORIZATION_POLICY"
name
string

Name of the Policy

object (AuthorizationServerPolicyConditions)
object (ClientPolicyCondition)

Specifies which clients are included in the Policy

include
Array of strings

Which clients are included in the Policy

description
string

Description of the Policy

priority
integer

Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server

status
string

Specifies whether requests have access to this Policy

Enum: "ACTIVE" "INACTIVE"
system
boolean

Specifies whether Okta created this Policy

Responses
201

Created

400

Bad Request

403

Forbidden

404

Not Found

429

Too Many Requests

post/api/v1/authorizationServers/{authServerId}/policies
Request samples
application/json
{
  • "type": "OAUTH_AUTHORIZATION_POLICY",
  • "status": "ACTIVE",
  • "name": "Default Policy",
  • "description": "Default policy description",
  • "priority": 1,
  • "system": false,
  • "conditions": {
    • "clients"": {
      }
    }
}
Response samples
application/json
{}

Retrieve a Policy
API Access Management
OAuth 2.0: okta.authorizationServers.read

Retrieves a policy

Request
path Parameters
authServerId
required
string

id of the Authorization Server

Example: GeGRTEr7f3yu2n7grw22
policyId
required
string

id of the Policy

Example: 00plrilJ7jZ66Gn0X0g3
Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

get/api/v1/authorizationServers/{authServerId}/policies/{policyId}
Request samples
Response samples
application/json
{}

Replace a Policy
API Access Management
OAuth 2.0: okta.authorizationServers.manage

Replaces a policy

Request
path Parameters
authServerId
required
string

id of the Authorization Server

Example: GeGRTEr7f3yu2n7grw22
policyId
required
string

id of the Policy

Example: 00plrilJ7jZ66Gn0X0g3
Request Body schema: application/json
required
id
string

ID of the Policy

type
string

Indicates that the Policy is an authorization server Policy

Value: "OAUTH_AUTHORIZATION_POLICY"
name
string

Name of the Policy

object (AuthorizationServerPolicyConditions)
object (ClientPolicyCondition)

Specifies which clients are included in the Policy

include
Array of strings

Which clients are included in the Policy

description
string

Description of the Policy

priority
integer

Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server

status
string

Specifies whether requests have access to this Policy

Enum: "ACTIVE" "INACTIVE"
system
boolean

Specifies whether Okta created this Policy

Responses
200

Success

400

Bad Request

403

Forbidden

404

Not Found

429

Too Many Requests

put/api/v1/authorizationServers/{authServerId}/policies/{policyId}
Request samples
application/json
{
  • "id": "00p5m9xrrBffPd9ah0g4",
  • "type": "OAUTH_AUTHORIZATION_POLICY",
  • "status": "ACTIVE",
  • "name": "Default Policy",
  • "description": "Default policy description",
  • "priority": 1,
  • "system": false,
  • "conditions": {
    • "clients"": {
      }
    }
}
Response samples
application/json
{}

Delete a Policy
API Access Management
OAuth 2.0: okta.authorizationServers.manage

Deletes a policy

Request
path Parameters
authServerId
required
string

id of the Authorization Server

Example: GeGRTEr7f3yu2n7grw22
policyId
required
string

id of the Policy

Example: 00plrilJ7jZ66Gn0X0g3
Responses
204

No Content

403

Forbidden

404

Not Found

429

Too Many Requests

delete/api/v1/authorizationServers/{authServerId}/policies/{policyId}
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": [ ]
}

Activate a Policy
API Access Management
OAuth 2.0: okta.authorizationServers.manage

Activates an authorization server policy

Request
path Parameters
authServerId
required
string

id of the Authorization Server

Example: GeGRTEr7f3yu2n7grw22
policyId
required
string

id of the Policy

Example: 00plrilJ7jZ66Gn0X0g3
Responses
204

No Content

403

Forbidden

404

Not Found

429

Too Many Requests

post/api/v1/authorizationServers/{authServerId}/policies/{policyId}/lifecycle/activate
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": [ ]
}

Deactivate a Policy
API Access Management
OAuth 2.0: okta.authorizationServers.manage

Deactivates an authorization server policy

Request
path Parameters
authServerId
required
string

id of the Authorization Server

Example: GeGRTEr7f3yu2n7grw22
policyId
required
string

id of the Policy

Example: 00plrilJ7jZ66Gn0X0g3
Responses
204

No Content

403

Forbidden

404

Not Found

429

Too Many Requests

post/api/v1/authorizationServers/{authServerId}/policies/{policyId}/lifecycle/deactivate
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": [ ]
}