Route people through a lobby. If you run a large building, you should make the lobby the sole place for entering and exiting. Ideally, you can staff the lobby with someone who screens people entering or exiting the building.
Issue identification cards to tenants, which will prevent strangers from attempting to enter the building.