The Internet of Things (IoT) facilitates the interaction, data collection, and exchange between devices and the network. With an increasing proliferation of IoT devices, the volume of data produced escalates at an exponential rate. Considering loT’s constrained computational and storage capabilities, the necessity for cloud data storage becomes imperative to enhance service quality. Scholars have introduced various auditing mechanisms, within which the role of a third-party auditor (TPA) emerges as a distinctive attribute in certain methodologies. Nonetheless, assuring the security of a centralized TPA poses significant challenges, a gap that blockchain technology seeks to bridge. Addressing this issue, our proposition is the Blockchain-based Anonymous Data Integrity Auditing (BADIA) for IoT within cloud environments, employing a federated blockchain approach. Our scheme has the following characteristics: conditional anonymity, fairness, accountability, and security. In conclusion, a comprehensive assessment, considering both security and performance metrics, demonstrates that the proposed scheme is robust and effectively alleviates the computational load for data proprietors who possess limited processing capabilities. This analysis ensures that our methodology not only adheres to stringent security standards but also optimizes the efficiency of data management for those with constrained computational resources.