{"record":{"id":"68c41b97cb714815","repo":"passbolt/passbolt_api","slug":"service-provider-not-supported","errorCode":null,"errorMessage":"Service provider not supported.","messagePattern":"Service provider not supported\\.","errorType":"http","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"plugins/PassboltEe/Sso/src/Service/SsoSettings/SsoSettingsSetService.php","lineNumber":157,"sourceCode":"        }\n\n        return $gpg->encrypt($jsonData, true);\n    }\n\n    /**\n     * @param array $data payload\n     * @return \\Passbolt\\Sso\\Form\\BaseSsoSettingsForm\n     */\n    protected function getSsoSettingsForm(array $data): BaseSsoSettingsForm\n    {\n        if (!isset($data['provider'])) {\n            throw new BadRequestException('Service provider missing.');\n        }\n        if (!is_string($data['provider'])) {\n            throw new BadRequestException('Service provider invalid.');\n        }\n        if (!in_array($data['provider'], SsoSetting::ALLOWED_PROVIDERS)) {\n            throw new BadRequestException('Service provider not supported.');\n        }\n\n        switch ($data['provider']) {\n            case SsoSetting::PROVIDER_AZURE:\n                return new SsoSettingsAzureDataForm();\n            case SsoSetting::PROVIDER_GOOGLE:\n                return new SsoSettingsGoogleDataForm();\n            case SsoSetting::PROVIDER_OAUTH2:\n                return new SsoSettingsOAuth2DataForm();\n            case SsoSetting::PROVIDER_ADFS:\n                return new SsoSettingsAdfsDataForm();\n            case SsoSetting::PROVIDER_PINGONE:\n                return new SsoSettingsPingOneDataForm();\n            default:\n                throw new BadRequestException('Service provider not supported.');\n        }\n    }\n}","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/passbolt/passbolt_api/blob/31c1bbc10f32808a607fa9bd81891e898779c0bc/plugins/PassboltEe/Sso/src/Service/SsoSettings/SsoSettingsSetService.php#L139-L175","documentation":"Thrown by SsoSettingsSetService::getSsoSettingsForm when 'provider' is a string but is not in SsoSetting::ALLOWED_PROVIDERS. Only known providers (azure, google, adfs, oauth2, pingone) can be configured.","triggerScenarios":"POST/PUT /sso/settings with provider set to an unrecognized string, e.g. {\"provider\": \"okta\"}, {\"provider\": \"Azure\"} (case-sensitive), or a typo like \"azrue\".","commonSituations":"Trying to configure an unsupported IdP (Okta, Auth0, Keycloak directly); capitalization mistakes; older/newer passbolt versions where the provider list differs; typos in scripts.","solutions":["Use one of the exact allowed provider identifiers (azure, google, adfs, oauth2, pingone) — all lowercase.","If your IdP is generic SAML/OIDC, use the appropriate supported mapping or upgrade passbolt to a version supporting it.","Check SsoSetting::ALLOWED_PROVIDERS in this codebase to confirm valid values for your installed version."],"exampleFix":"// before\n\"provider\": \"Okta\"\n// after\n\"provider\": \"azure\"","handlingStrategy":"validation","validationCode":"const ALLOWED = ['azure','google','adfs','oauth2','pingone']; if (!in_array($payload['provider'], ALLOWED, true)) { throw new \\InvalidArgumentException('Unsupported provider'); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only lowercase provider identifiers from SsoSetting::ALLOWED_PROVIDERS.","Source the provider list from the API docs for your passbolt version.","Never hardcode unsupported IdPs into integrations."],"tags":["php","sso","bad-request","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"31c1bbc10f32808a607fa9bd81891e898779c0bc","analyzedAt":"2026-09-17T00:04:38.960Z","contentChangedAt":"2026-09-17T00:04:38.960Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}