Deploying the Internet of Things (IoT) in the transfer of enormous medical data often promotes challenges with the security, confidentiality, and privacy of the user’s sensitive data. In addition, the access control for prohibiting unauthorized access has been facing challenges with single-point-of-failure, collusion, and other security issues. To address these challenges associated with IoT access control, this research proposes a Blockchain-enabled IoT access control for sharing Electronic health records (EHR). The proposed authentic access control scheme transfers the data to the authenticated user without discrepancies. The proposed technique utilizes the hyperledger composer fabric blockchain that improves the transparency and traceability of the network, and the intelligent contract keeps track of the information, which reduces the possibility of unauthorized access. The proposed access control scheme validates the request effectively and transmits the data efficiently. The effectiveness of the proposed access control scheme is evaluated by analyzing the blocks in terms of metrics such as responsiveness of 185.47 secs, 95% Genuine User Detection (GUD), 96.50% Privacy, and 3.50% Information loss, for 100 blocks and proposed access control scheme works more efficiently in transmitting the data. © The Author(s), under exclusive licence to Springer Science+Business Media, LLC, part of Springer Nature 2024.