This paper presents a novel anonymization method called micro-aggregation generalization (mage) aimed at preserving privacy in data publishing while retaining data utility. The study highlights the vulnerabilities of the mage approach to homogeneity and background knowledge attacks, proposing the l-diversity method to enhance privacy protection by ensuring diversity in sensitive attribute values within equivalence classes. The findings indicate that combining mage with l-diversity effectively mitigates these vulnerabilities and improves overall data security.