{"record":{"id":"3ae79c0886c79a1a","repo":"theonedev/onedev","slug":"unable-to-change-password-as-you-are-authenticatin","errorCode":null,"errorMessage":"Unable to change password as you are authenticating via external system","messagePattern":"Unable to change password as you are authenticating via external system","errorType":"exception","errorClass":"ExplicitException","httpStatus":null,"severity":"info","filePath":"server-core/src/main/java/io/onedev/server/web/page/my/password/MyPasswordPage.java","lineNumber":23,"sourceCode":"import io.onedev.server.web.component.user.passwordedit.PasswordEditPanel;\nimport io.onedev.server.web.page.my.MyPage;\n\nimport static io.onedev.server.model.User.Type.ORDINARY;\nimport static io.onedev.server.web.translation.Translation._T;\n\nimport org.apache.wicket.Component;\nimport org.apache.wicket.markup.html.basic.Label;\nimport org.apache.wicket.model.AbstractReadOnlyModel;\nimport org.apache.wicket.request.mapper.parameter.PageParameters;\n\npublic class MyPasswordPage extends MyPage {\n\t\n\tpublic MyPasswordPage(PageParameters params) {\n\t\tsuper(params);\n\t\tif (getUser().getType() != ORDINARY || getUser().isDisabled())\n\t\t\tthrow new IllegalStateException();\n\t\tif (getUser().getPassword() == null)\n\t\t\tthrow new ExplicitException(_T(\"Unable to change password as you are authenticating via external system\"));\n\t}\n\n\t@Override\n\tprotected void onInitialize() {\n\t\tsuper.onInitialize();\n\t\t\n\t\tadd(new PasswordEditPanel(\"content\", new AbstractReadOnlyModel<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User getObject() {\n\t\t\t\treturn getUser();\n\t\t\t}\n\t\t\t\n\t\t}));\n\t}\n\n\t@Override\n\tprotected Component newTopbarTitle(String componentId) {","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/web/page/my/password/MyPasswordPage.java#L5-L41","documentation":"MyPasswordPage throws an ExplicitException when the current user has no local password, meaning the account authenticates via an external system (LDAP, SSO, OAuth). OneDev does not manage such credentials, so the change-password page refuses to render. The message is user-facing and localized.","triggerScenarios":"Opening the my-password page while logged in as an external-authentication user whose password field is null (e.g. LDAP or SSO-provisioned account).","commonSituations":"Users migrated to LDAP/SSO still trying the old password page; admins expecting per-user password reset for federated accounts.","solutions":["Change the password in the external authentication system (LDAP/SSO provider) instead","If the user should be local, re-provision or convert the account so it has a local password set by an admin","Verify the user's authentication settings in admin security settings"],"exampleFix":"// before: navigating to /my/password for an LDAP user\n// after: change password at your LDAP/SSO identity provider, then log in with it","handlingStrategy":"fallback","validationCode":"if (user.getType() == ORDINARY && user.getPassword() == null) {\n    // user is externally authenticated; direct to external IdP\n}","typeGuard":null,"tryCatchPattern":"try {\n    openMyPasswordPage();\n} catch (ExplicitException e) {\n    redirectToExternalPasswordManagement();\n}","preventionTips":["Use the external identity provider's password change flow for LDAP/SSO accounts","Check user.getPassword() != null before offering the change-password UI","Educate users that federated accounts are managed at the IdP"],"tags":["authentication","ldap","sso","password"],"backgroundTag":"authentication-required","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}