The Internet of Things (IoT) is a popular concept that has begun to take its place in our lives today with the growth and development of smart devices. With the spread of such technologies, it is inevitable that some security problems will arise. In terms of IoT systems, the communication of devices, the management of connections, the storage of distributed data, the authentication and authorization procedures on devices emerge significant security risks. In this study, a new approach based on blockchain for user access management problem of IoT environments is proposed in the light of current literature, considering the application level security vulnerabilities in IoT devices. In this context, blockchain technology for user access management and Keycloak which provides single sign-on infrastructure for authentication and session management uses in IoT devices.