Dear @user1993,
Welcome back to the Wefugees Community and thank you for reaching out to us.
Without knowing the circumstances too well, it is a bit difficult to say if the social worker was legally allowed to enter your room or not. However, I absolutely agree with you that he/she at least could have let you know in advance or better wait until you are present. I recommend you to talk to the manager of the accomodation, or if in place, the so-called "Beschwerdestelle" (complaints office). The latter would be specifically introduced for cases like yours. People can contact them confidentially and they will support you in your issue. I hope this helps and please don't hesitate to get back to us with any further questions.
All the best,
Meike