Disable organization SSO
Disable organization SSO: disableOrganizationSso in the TypeScript, Python, Rust and Go clients.
POST /v1/auth/organizations/{orgId}/sso/disable
Deletes the provider connection, releases the SSO requirement once the connection is gone, then unbinds the chosen domains. Retry with the same Idempotency-Key to resume or await the same run.
photon.auth.disableOrganizationSso(input: DisableOrganizationSsoInput, options?: RequestOptions): Promise<DisableOrganizationSsoOutput>photon.auth.disable_organization_sso(input: DisableOrganizationSsoInput, *, options: RequestOptions | None = None) -> models.OrganizationSsoConfigurationclient.disable_organization_sso(idempotency_key: String, org_id: String, body: &types::DisableOrganizationSsoRequest).await -> Result<ResponseValue<types::OrganizationSsoConfiguration>, Error<DisableOrganizationSsoError>>client.Auth.DisableOrganizationSso(ctx context.Context, params *DisableOrganizationSsoParams, opts ...RequestOption) (*OrganizationSsoConfiguration, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.auth.disableOrganizationSso({
path: {
orgId: "orgId",
},
headers: {
idempotencyKey: "idempotencyKey",
},
body: {
expectedVersion: "expectedVersion",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import DisableOrganizationSsoInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.auth.disable_organization_sso(
DisableOrganizationSsoInput.model_validate({
"path": {
"orgId": "orgId",
},
"headers": {
"Idempotency-Key": "idempotencyKey",
},
"body": {
"expectedVersion": "expectedVersion",
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.disable_organization_sso(
"idempotencyKey".to_owned(),
"orgId".to_owned(),
&serde_json::from_value(serde_json::json!({
"expectedVersion": "expectedVersion",
}))?,
)
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"encoding/json"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
var body photonapi.DisableOrganizationSsoRequest
if err := json.Unmarshal([]byte(`{
"expectedVersion": "expectedVersion"
}`), &body); err != nil {
return err
}
result, err := client.Auth.DisableOrganizationSso(ctx, &photonapi.DisableOrganizationSsoParams{
IdempotencyKey: "idempotencyKey",
OrgID: "orgId",
Body: body,
})
if err != nil {
return err
}
_ = result{
"connectionChangedAt": null,
"connectionGeneration": "string",
"connectionState": "not_configured",
"connectionType": "string",
"desiredSsoEnforced": true,
"domains": [
{
"domain": "string",
"state": "verified"
}
],
"organizationId": "string",
"policySyncStatus": "synced",
"providerAvailable": true,
"ssoEnforced": true,
"ssoJitEnabled": true,
"version": "string"
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Identifies one logical mutation across retries.
Body
Returns
200 Current connection and independent local policy state. OrganizationSsoConfiguration
Headers: Photon-Version. The raw response carries these headers; see Raw responses.