{"record":{"id":"4a0553d136f9061e","repo":"passbolt/passbolt_api","slug":"no-valid-sso-settings-found-ssopingoneservice","errorCode":null,"errorMessage":"No valid SSO settings found.","messagePattern":"No valid SSO settings found\\.","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"plugins/PassboltEe/Sso/src/Service/Sso/PingOne/SsoPingOneService.php","lineNumber":72,"sourceCode":"            ['httpClient' => $this->getCustomHttpClient()]\n        );\n    }\n\n    /**\n     * @return \\Passbolt\\Sso\\Model\\Dto\\SsoSettingsDto\n     */\n    protected function assertAndGetSsoSettings(): SsoSettingsDto\n    {\n        try {\n            $ssoSettings = (new SsoSettingsGetService())->getActiveOrFail(true);\n            if ($ssoSettings->provider !== SsoSetting::PROVIDER_PINGONE) {\n                throw new BadRequestException(__('Invalid provider. Expected PingOne.'));\n            }\n            if (!($ssoSettings->data instanceof SsoSettingsPingOneDataDto)) {\n                throw new BadRequestException(__('Invalid provider data. Expected PingOne settings.'));\n            }\n        } catch (Exception $exception) {\n            throw new BadRequestException(__('No valid SSO settings found.'), 400, $exception);\n        }\n\n        return $ssoSettings;\n    }\n}\n","sourceCodeStart":54,"sourceCodeEnd":78,"githubUrl":"https://github.com/passbolt/passbolt_api/blob/31c1bbc10f32808a607fa9bd81891e898779c0bc/plugins/PassboltEe/Sso/src/Service/Sso/PingOne/SsoPingOneService.php#L54-L78","documentation":"Catch-all in SsoPingOneService::assertAndGetSsoSettings: every failure while fetching/validating active SSO settings (none active, wrong provider, wrong data DTO) is rethrown as BadRequestException 'No valid SSO settings found.' with the underlying exception attached as previous.","triggerScenarios":"getActiveOrFail(true) finds no active settings (SSO unconfigured, deleted, or draft); or one of the PingOne provider/data validation errors fired inside the try and got wrapped by this catch.","commonSituations":"SSO never set up or removed by admin; settings in draft state; request hit the PingOne endpoint while another provider is active; wrong database/environment without settings.","solutions":["Create/activate valid PingOne SSO settings via the admin SSO configuration flow","If a different provider is active, use its endpoint instead of the PingOne service","Inspect the chained previous exception in logs to identify whether it was not-found vs validation mismatch","Confirm the app talks to the environment/database containing the expected SSO settings"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"try {\n    $settings = (new SsoSettingsGetService())->getActiveOrFail(true);\n    $hasValidPingOne = $settings->provider === SsoSetting::PROVIDER_PINGONE\n        && $settings->data instanceof SsoSettingsPingOneDataDto;\n} catch (RecordNotFoundException $e) {\n    $hasValidPingOne = false;\n}","typeGuard":null,"tryCatchPattern":"try {\n    $settings = $pingOneService->assertAndGetSsoSettings();\n} catch (BadRequestException $e) {\n    $previous = $e->getPrevious();\n    // not-found => run SSO setup; else provider/data mismatch\n}","preventionTips":["Activate valid PingOne settings before users attempt SSO login","Check the previous exception to separate not-found from validation errors","Confirm the environment/database holds the expected settings"],"tags":["sso","pingone","missing-settings","configuration"],"backgroundTag":"missing-config-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"}