Disable identity provider

Disables an enabled identity provider, removing it as a login entry point. The configuration values are preserved, so calling the enable endpoint again reactivates the same configuration.

Unlike activation, disabling does not perform configuration validation. Disabling succeeds even if a required option is empty.

Once disabled, the /sso/<code> path returns HTTP status code 404 and the provider is excluded from the Get Enabled Identity Providers results. This path is a relative path that does not include the host address. Disabling does not terminate any SSO login session already in progress.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

PUT /api/sonar/id-providers/:code/disable
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -X PUT \
     https://HOSTNAME/api/sonar/id-providers/saml/disable
Request Parameters
Path Parameters
KeyTypeDescriptionNotes
codeStringIdentity provider code

Success Response

{}

Error Responses

Provider does not exist

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "provider not found: saml"
}
No registered configuration

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "SSO provider config not found: saml"
}
Permission denied

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}