keycloak/keycloak
View on GitHubOrganizationProvider.addManagedMember still adds member as unmanaged
Open
#43094 opened on Sep 30, 2025
area/organizationshelp wantedkind/bugpriority/normalstatus/auto-bumpteam/core-iam
Description
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
core
Describe the bug
When using OrganizationProvider.addManagedMember to add a user to an organization as a managed member, the user is still marked as unmanaged.
Going through the source code, I notice there is a default method in UserModel that drops the MembershipMetadata parameter.
default void joinGroup(GroupModel group, MembershipMetadata metadata) {
joinGroup(group);
}
And the eventual joinGroup implementation is then using unmanaged as default.
Version
26.4.0
Regression
- The issue is a regression
Expected behavior
When calling the OrganizationProvider.addManagedMember method, the user should be added as a managed member to the organization.
Actual behavior
When calling the OrganizationProvider.addManagedMember method, the user is added as an unmanaged member to the organization.
How to Reproduce?
Create a AdminRealmResourceProvider with a resource path that calls this method.
Anything else?
No response