Get Identity Provider

Retrieves the basic information, option specification, and current values for the specified Identity provider configuration. Values for keys marked as protected are masked in the response.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

GET /api/sonar/sso-providers/:code
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     https://HOSTNAME/api/sonar/id-providers/saml
Request Parameters
Path Parameters
KeyTypeDescriptionNotes
idStringIdentity provider identifier

Success Response

{
  "code": "saml",
  "name": "SAML",
  "path": "/sonar/sso/saml",
  "icon": "iVBORw0KGgoAAAANSUhEUgAA...",
  "enabled": true,
  "description": "Corporate SAML IdP integration",
  "configs": [
    {
      "name": "idp_url",
      "protected": false,
      "value": "https://idp.example.com/saml",
      "type": "string",
      "subtype": null,
      "required": true,
      "display_name": "IdP URL",
      "description": "SAML IdP endpoint",
      "default_value": null,
      "min": null,
      "max": null
    },
    {
      "name": "client_secret",
      "protected": true,
      "value": "",
      "type": "string",
      "subtype": null,
      "required": true,
      "display_name": "Client Secret",
      "description": "",
      "default_value": null,
      "min": null,
      "max": null
    }
  ]
}
  • code (String): Identity provider identifier
  • name (String): Localized display name
  • path (String): SSO login entry path
  • icon (String): Base64-encoded icon image, or null if no icon is provided
  • enabled (Boolean): Whether the provider is enabled
  • description (String): User-supplied description
  • configs (Array): Option specification and current values
    • name (String): Option key
    • protected (Boolean): Whether the option is protected. When true, the value is masked as an empty string
    • value (Object): Current configured value. Empty string if the option is protected
    • type (String): Data type
    • subtype (String): UI-specific extension component type
    • required (Boolean): Whether the option is required
    • display_name (String): Localized display name shown in the UI
    • description (String): Localized description shown in the UI
    • default_value (Object): Default value. null if subtype is enum
    • selectable (Object): List of selectable values when subtype is enum
    • min (Number): Minimum value constraint
    • max (Number): Maximum value constraint

Error Responses

id is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "id should be not null"
}
Provider does not exist

HTTP status code 500

{
  "error_code": "illegal-argument",
  "error_msg": "provider not found: saml"
}
Permission denied

HTTP status code 500

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