If you use SocketIO's 'room', probably you won't need to socket id. What's use case?
Without rooms, you've to map every sockets id, store it, iterate over it for new messages etc...
From my answer in What is the purpose of "rooms" in Socket.io?
If a user has multiple devices/multiple tabs, subscribe him to a room, where room's id is user's id. So when there is a new message for him, send that message to that room, it will be delivered to all his devices/tabs.