{"record":{"id":"8535f6435bd7fd5b","repo":"theonedev/onedev","slug":"unable-to-find-sso-provider","errorCode":null,"errorMessage":"Unable to find SSO provider: ","messagePattern":"Unable to find SSO provider: ","errorType":"exception","errorClass":"AuthenticationException","httpStatus":401,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/web/page/security/SsoProcessPage.java","lineNumber":132,"sourceCode":"\t\t\t\tthrow new RedirectToUrlException(redirectUrlAfterLogin);\t\t\n\t\t\telse\n\t\t\t\tthrow new RestartResponseException(HomePage.class);\n\t\t}\n\t\t\n\t\tstage = params.get(PARAM_STAGE).toString();\n\t\t\n\t\ttry {\n\t\t\tString providerName = params.get(PARAM_PROVIDER).toString();\n\n\t\t\tproviderModel = new LoadableDetachableModel<SsoProvider>() {\n\t\t\t\t@Override\n\t\t\t\tprotected SsoProvider load() {\n\t\t\t\t\treturn OneDev.getInstance(SsoProviderService.class).find(providerName);\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tif (getProvider() == null) \n\t\t\t\tthrow new AuthenticationException(_T(\"Unable to find SSO provider: \") + providerName);\n\t\t\t\n\t\t\tif (stage.equals(STAGE_INITIATE)) {\n\t\t\t\tString redirectUrlAfterLogin;\n\t\t\t\tUrl url = RestartResponseAtInterceptPageException.getOriginalUrl();\n\t\t\t\tif (url != null && url.toString().length() != 0) \n\t\t\t\t\tredirectUrlAfterLogin = url.toString();\n\t\t\t\telse \n\t\t\t\t\tredirectUrlAfterLogin = RequestCycle.get().urlFor(HomePage.class, new PageParameters()).toString(); \n\t\t\t\tSession.get().bind();\n\t\t\t\tSession.get().setAttribute(SESSION_ATTR_REDIRECT_URL, redirectUrlAfterLogin);\n\t\t\t\tthrow new RedirectToUrlException(getProvider().getConnector().buildAuthUrl(providerName));\n\t\t\t} else {\n\t\t\t\tauthenticated = getProvider().getConnector().handleAuthResponse(providerName);\n\t\t\t\tvar aUser = transactionService.call(() -> {\t\t\t\t\t\n\t\t\t\t\tvar ssoAccount = ssoAccountService.find(getProvider(), authenticated.getSubject());\n\t\t\t\t\tif (ssoAccount != null) {\n\t\t\t\t\t\tvar user = ssoAccount.getUser();\n\t\t\t\t\t\tif (user.getType() != ORDINARY || user.isDisabled()) {","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/web/page/security/SsoProcessPage.java#L114-L150","documentation":"SsoProcessPage resolves the SSO provider by name from the URL via SsoProviderService.find(providerName). When no provider with that name is configured it throws AuthenticationException('Unable to find SSO provider: ' + providerName), since the login flow cannot proceed without a matching provider configuration.","triggerScenarios":"Visiting the SSO process URL with a providerName that does not match any configured SSO provider — provider renamed or deleted after the URL/bookmark was created, typo in the URL, or configuration not restored after migration/upgrade.","commonSituations":"Saved bookmark to an SSO login that was since removed or renamed in Admin > SSO Providers; cluster node with outdated/out-of-sync configuration; casing mismatch in provider name.","solutions":["Check the exact provider name under Admin > SSO Providers and correct the URL.","Recreate the SSO provider if it was deleted, keeping the same name as old links.","Update bookmarks/login-page links to the current provider name.","Verify the same SSO provider config exists on all nodes if running a cluster."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"SsoProvider p = OneDev.getInstance(SsoProviderService.class).find(providerName);\nif (p == null) { /* fall back to standard login page */ }","typeGuard":null,"tryCatchPattern":"try {\n  startSsoLogin(providerName);\n} catch (AuthenticationException e) {\n  setResponsePage(SignInPage.class);\n}","preventionTips":["Build SSO login URLs from the configured provider list, not hardcoded names.","Update bookmarks/links when renaming SSO providers.","Keep provider names casing-consistent across links and config.","Synchronize SSO configuration across cluster nodes."],"tags":["sso","authentication","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}