apolloconfig/apollo · error · UnsupportedOperationException
Create or update user operation is unsupported
Error message
Create or update user operation is unsupported
What it means
Thrown by createOrUpdateUser when the configured UserService implementation is not SpringSecurityUserService, so Apollo cannot create or update users locally.
Source
Thrown at apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/UserController.java:117
if (!consumerRequest && !unifiedPermissionValidator.isSuperAdmin()
&& (!user.getUsername().equals(userInfoHolder.getUser().getUserId())
|| user.getEnabled() != USER_ENABLED)) {
throw new AccessDeniedException("Create or update user operation is forbidden");
}
CheckResult pwdCheckRes = passwordChecker.checkWeakPassword(user.getPassword());
if (!pwdCheckRes.isSuccess()) {
throw new BadRequestException(pwdCheckRes.getMessage());
}
if (userService instanceof SpringSecurityUserService) {
if (Boolean.TRUE.equals(isCreate)) {
((SpringSecurityUserService) userService).create(user);
} else {
((SpringSecurityUserService) userService).update(user);
}
} else {
throw new UnsupportedOperationException("Create or update user operation is unsupported");
}
return ResponseEntity.ok().build();
}
@Override
public ResponseEntity<Void> changeUserEnabled(OpenUserDTO openUserDTO, String operator) {
boolean consumerRequest = requireUserManagementMutationPermission(operator);
if (!consumerRequest && !unifiedPermissionValidator.isSuperAdmin()) {
throw new AccessDeniedException("Change user enabled operation is forbidden");
}
UserPO user = OpenApiModelConverters.toUserPO(openUserDTO);
if (userService instanceof SpringSecurityUserService) {
((SpringSecurityUserService) userService).changeEnabled(user);
} else {
throw new UnsupportedOperationException("change user enabled is unsupported");
}
return ResponseEntity.ok().build();
}View on GitHub (pinned to d95fc18d11)
Solutions
- Configure Apollo to use the Spring Security user service (the default built-in user management) if user creation/update must be supported.
- If using an external identity provider (e.g., LDAP), manage users in that system instead of through this endpoint.
When it happens
Trigger: Thrown when the configured user service SPI does not support creating or updating users (e.g. LDAP-backed user storage is read-only).
Common situations: Apollo is configured with LDAP/SSO user provider; user management is delegated to an external directory.
AI-assisted analysis of apolloconfig/apollo@d95fc18d11 (2026-08-14).
Data as JSON: /api/errors/fc6b614a8096e078.
Report an issue: GitHub.