Remove Identity Providers
Deletes the specified Identity provider configurations. An enabled provider cannot be deleted; failed deletions are reported in the failures array along with the reason.
Required Permissions
Requires the ADMIN role or higher. Disable a provider before attempting to remove it.
HTTP Request
DELETE /api/sonar/sso-providers
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-X DELETE \
"https://HOSTNAME/api/sonar/id-providers?codes=saml,oidc"
Request Parameters
| Key | Required | Type | Description | Notes |
|---|---|---|---|---|
| codes | Yes | String list | List of Identity provider identifiers | Comma-separated identifiers |
Success Response
{
"failures": []
}
- failures (Array): Items that failed to delete. Empty array when every item succeeds
- code (String): Identifier that failed to delete
- error (String): Failure reason
Error Responses
codes is missing
HTTP status code 400
{
"error_code": "null-argument",
"error_msg": "codes should be not null"
}
Permission denied
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}
Attempting to delete an enabled provider
The result for each identifier is reported in the failures array as shown below.
{
"failures": [
{
"code": "saml",
"error": "provider is running"
}
]
}