{"record":{"id":"b78f72517c433921","repo":"passbolt/passbolt_api","slug":"no-valid-sso-settings-found","errorCode":null,"errorMessage":"No valid SSO settings found.","messagePattern":"No valid SSO settings found\\.","errorType":"http","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"plugins/PassboltEe/Sso/src/Service/Sso/Adfs/SsoAdfsService.php","lineNumber":71,"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_ADFS) {\n                throw new BadRequestException(__('Invalid provider. Expected AD FS.'));\n            }\n            if (!($ssoSettings->data instanceof SsoSettingsAdfsDataDto)) {\n                throw new BadRequestException(__('Invalid provider data. Expected AD FS 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":53,"sourceCodeEnd":77,"githubUrl":"https://github.com/passbolt/passbolt_api/blob/31c1bbc10f32808a607fa9bd81891e898779c0bc/plugins/PassboltEe/Sso/src/Service/Sso/Adfs/SsoAdfsService.php#L53-L77","documentation":"assertAndGetSsoSettings wraps SsoSettingsGetService::getActiveOrFail(true) and the provider/data checks in a try/catch. Any Exception (no active settings found, draft-only state, or the provider/data assertion failures above) is converted into a single BadRequestException 'No valid SSO settings found.' with the original exception chained.","triggerScenarios":"No activated SSO settings exist in the database, or an SSO operation is attempted while only a draft exists, or the inner provider/data assertions threw.","commonSituations":"SSO settings were created but never activated; database was reset/restored losing the sso_settings rows; wrong org id or missing settings for the environment; settings deleted by another admin mid-flow.","solutions":["Configure and activate SSO settings in passbolt administration (complete the full flow, not just a draft).","Use the dry-run flow to validate settings before activation.","Check the chained exception in the response/logs for the underlying cause (no settings vs invalid provider).","Verify sso_settings rows exist and are active for your organization id in the database."],"exampleFix":"// before\nPOST /sso/settings only saved as draft, then login attempted\n// after\nPOST /sso/settings/:id/activate (activate the draft) then retry SSO login","handlingStrategy":"try-catch","validationCode":"$active = (new SsoSettingsGetService())->getActiveOrFail();\nif (!$active) {\n    // configure and activate SSO settings before attempting SSO\n}","typeGuard":null,"tryCatchPattern":"try {\n    $uac = $service->assertStateCodeAndGetUac(...);\n} catch (BadRequestException $e) {\n    if (str_contains($e->getMessage(), 'No valid SSO settings found')) {\n        // check $e->getPrevious() for the root cause (missing vs invalid settings)\n    }\n    throw $e;\n}","preventionTips":["Always complete the activation step of the SSO settings wizard; drafts are not usable.","Verify sso_settings rows survive DB resets/restores.","Check the chained previous exception in logs for the real cause.","Use dry-run before activation to ensure settings are valid."],"tags":["sso","adfs","configuration","missing-settings"],"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"}