Skip to content
Start here

Update SSO connector state

client.IAM.SSO.Update(ctx, ssoConnectorID, params) (*SSOUpdateResponse, error)
PATCH/accounts/{account_id}/sso_connectors/{sso_connector_id}

Update SSO connector state

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
SSO Connector Write
ParametersExpand Collapse
ssoConnectorID string

SSO Connector identifier tag.

maxLength32
minLength32
params SSOUpdateParams
AccountID param.Field[string]

Path param: Account identifier tag.

maxLength32
minLength32
Enabled param.Field[bool]optional

Body param: SSO Connector enabled state

UseFedrampLanguage param.Field[bool]optional

Body param: Controls the display of FedRAMP language to the user during SSO login

ReturnsExpand Collapse
type SSOUpdateResponse struct{…}
ID stringoptional

SSO Connector identifier tag.

maxLength32
minLength32
CreatedOn Timeoptional

Timestamp for the creation of the SSO connector

formatdate-time
EmailDomain stringoptional
Enabled booloptional
UpdatedOn Timeoptional

Timestamp for the last update of the SSO connector

formatdate-time
UseFedrampLanguage booloptional

Controls the display of FedRAMP language to the user during SSO login

Verification SSOUpdateResponseVerificationoptional
Code stringoptional

DNS verification code. Add this entire string to the DNS TXT record of the email domain to validate ownership.

Status SSOUpdateResponseVerificationStatusoptional

The status of the verification code from the verification process.

One of the following:
const SSOUpdateResponseVerificationStatusAwaiting SSOUpdateResponseVerificationStatus = "awaiting"
const SSOUpdateResponseVerificationStatusPending SSOUpdateResponseVerificationStatus = "pending"
const SSOUpdateResponseVerificationStatusFailed SSOUpdateResponseVerificationStatus = "failed"
const SSOUpdateResponseVerificationStatusVerified SSOUpdateResponseVerificationStatus = "verified"

Update SSO connector state

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/iam"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  sso, err := client.IAM.SSO.Update(
    context.TODO(),
    "023e105f4ecef8ad9ca31a8372d0c353",
    iam.SSOUpdateParams{
      AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sso.ID)
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "created_on": "2025-01-01T12:21:02.0000Z",
    "email_domain": "example.com",
    "enabled": false,
    "updated_on": "2025-01-01T12:21:02.0000Z",
    "use_fedramp_language": false,
    "verification": {
      "code": "cloudflare_dashboard_sso=023e105f4ecef8ad9ca31a8372d0c353",
      "status": "pending"
    }
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "created_on": "2025-01-01T12:21:02.0000Z",
    "email_domain": "example.com",
    "enabled": false,
    "updated_on": "2025-01-01T12:21:02.0000Z",
    "use_fedramp_language": false,
    "verification": {
      "code": "cloudflare_dashboard_sso=023e105f4ecef8ad9ca31a8372d0c353",
      "status": "pending"
    }
  }
}