Skip to content

Edit endpoint OIDC provider

PUT
/v1/endpoint-oidc-providers/{endpointOIDCProviderID}
curl --request PUT \
--url https://api.defined.net/v1/endpoint-oidc-providers/endpointoidc-WDRO5WY4LTKA2AALKZQ2OHBSDE \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Corporate SSO", "clientID": "0oa1b2c3d4e5f6g7h8i9", "issuerURL": "https://example.okta.com", "enabled": false, "networkID": "network-KAOWMXZHZWCVMGGFKM22XEGYLE", "roleID": "role-PZEDBXHCEXKAKJPZ6XOQTIAJA4", "authValidityHours": 720, "domainID": "domain-3QZRDHZ5SZBQ5DBHUQE6GSMXGI", "autoAssignCIDRs": [ "100.100.0.0/22" ] }'

Edit an existing endpoint OIDC provider.

Caution: Any properties not provided in the request will be reset to their default values, except clientSecret, which keeps its current value when omitted.

Token scope required: endpoint-oidc-providers:update

endpointOIDCProviderID
required
string

Example

endpointoidc-WDRO5WY4LTKA2AALKZQ2OHBSDE
Media typeapplication/json
object
name
required
string
>= 1 characters <= 50 characters
clientID
required

OAuth client ID issued by the identity provider.

string
>= 1 characters <= 255 characters
clientSecret

OAuth client secret issued by the identity provider. Required when creating a provider. Omit when updating to keep the current secret.

string
>= 1 characters <= 255 characters
issuerURL
required

HTTPS issuer URL of the identity provider. Its OpenID Connect discovery document at /.well-known/openid-configuration must be reachable when the request is made, and its issuer field must match this value exactly.

string format: uri
>= 1 characters <= 255 characters
enabled

Whether users can enroll hosts by signing in with this provider. Requires domainID.

boolean
networkID
required

Network that hosts enrolled through this provider join.

string
roleID

Role assigned to hosts enrolled through this provider.

string | null
authValidityHours

How long, in hours, a host keeps network access after its user signs in. Omit for access that does not expire.

integer | null
>= 1 <= 43800
domainID

Email domain whose users may sign in with this provider. Required when enabled is true, and the domain must be verified before the provider can be enabled. Each domain may be enabled on only one provider.

string | null
autoAssignCIDRs

Prefixes from which hosts enrolled through this provider are assigned addresses. Each must exactly match the network’s IPv4 CIDR or IPv6 prefix. On a network with an IPv6 prefix, that prefix is always included even if omitted here. On a network using certificate version 1, the list is replaced with the network’s IPv4 CIDR.

Array<string> | null
<= 2 items

Example

{
"name": "Corporate SSO",
"clientID": "0oa1b2c3d4e5f6g7h8i9",
"issuerURL": "https://example.okta.com",
"enabled": false,
"networkID": "network-KAOWMXZHZWCVMGGFKM22XEGYLE",
"roleID": "role-PZEDBXHCEXKAKJPZ6XOQTIAJA4",
"authValidityHours": 720,
"domainID": "domain-3QZRDHZ5SZBQ5DBHUQE6GSMXGI",
"autoAssignCIDRs": [
"100.100.0.0/22"
]
}

Successful operation

Media typeapplication/json
object
data
required
object
id
required
string
organizationID
required
string
name
required
string
clientID
required
string
issuerURL
required
string format: uri
enabled
required

Whether users can enroll hosts by signing in with this provider.

boolean
networkID
required

Network that hosts enrolled through this provider join.

string
roleID
required

Role assigned to hosts enrolled through this provider.

string | null
authValidityHours
required

How long, in hours, a host keeps network access after its user signs in. null means access does not expire.

integer | null
domainID
required

Email domain whose users may sign in with this provider.

string | null
autoAssignCIDRs
required

Prefixes from which hosts enrolled through this provider are assigned addresses. Includes the network’s IPv6 prefix whenever the network has one.

Array<string> | null

Example

{
"data": {
"id": "endpointoidc-WDRO5WY4LTKA2AALKZQ2OHBSDE",
"organizationID": "org-F63A24JGCLJV3ZEUTLCBISGETA",
"name": "Corporate SSO",
"clientID": "0oa1b2c3d4e5f6g7h8i9",
"issuerURL": "https://example.okta.com",
"enabled": false,
"networkID": "network-KAOWMXZHZWCVMGGFKM22XEGYLE",
"roleID": "role-PZEDBXHCEXKAKJPZ6XOQTIAJA4",
"authValidityHours": 720,
"domainID": "domain-3QZRDHZ5SZBQ5DBHUQE6GSMXGI",
"autoAssignCIDRs": [
"100.100.0.0/22",
"fdef:c0:c0:1::/80"
]
}
}

Validation error

Media typeapplication/json
object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any

Examples

A provider already exists with the name.

{
"errors": [
{
"code": "ERR_DUPLICATE_VALUE",
"message": "value already exists",
"path": "name"
}
]
}

The API key is missing, invalid or expired.

Media typeapplication/json
object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any

Example

{
"errors": [
{
"code": "ERR_UNAUTHORIZED",
"message": "unauthorized"
}
]
}

The API key lacks a required scope.

Media typeapplication/json
object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any

Examples

ExamplemissingScope

The API key lacks a required scope.

{
"errors": [
{
"code": "ERR_FORBIDDEN",
"message": "api key must support the following scopes: hosts:read"
}
]
}

Endpoint OIDC provider not found

Media typeapplication/json
object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any

Example

{
"errors": [
{
"code": "ERR_NOT_FOUND",
"message": "resource not found"
}
]
}

The organization has exceeded its API request rate limit. Retry the request after a short delay.

Media typeapplication/json
object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any

Example

{
"errors": [
{
"code": "ERR_TOO_MANY_REQUESTS",
"message": "too many requests"
}
]
}