Organizations in Keycloak use MembershipType to define how members relate to the organization:
MembershipTypeManaged: The member cannot exist without the organization.MembershipTypeUnmanaged: The member can exist independently of the organization.
Use MemberRepresentation to represent an organization member, which embeds the standard User type and includes the MembershipType.
// MembershipType constants
const (
MembershipTypeManaged MembershipType = "MANAGED"
MembershipTypeUnmanaged MembershipType = "UNMANAGED"
)
type MemberRepresentation struct {
User
MembershipType *MembershipType `json:"membershipType,omitempty"`
}