MS SQL Server 2016 - Database Security - Login Permissions
There is a user &quot;Guest&quot; in each database. This user gives some permission for everyone.
My guess is that for the database where you can &quot;Expend&quot; the DB, your &quot;guest&quot; user  in those database is probably enable and probably have the &quot;Connect&quot; to the database securable (and I hope not more then connect)
To disable that user, run this TSQL:
Use [yourDB]
go
REVOKE CONNECT FROM guest;
GO

Once this is done, your login x should receive the error you are expecting.