A method is proposed to estimate objectively occupants' visual discomfort in small office rooms as a function of the illuminance at one or more locations. Expressed as a visual discomfort probability, it is based on an analysis of the past history of the user's interactions with the blinds and lighting controls. A Bayesian formalism is applied to infer the probability that any illuminance distribution should be considered by the user as visually uncomfortable. This method is applied to the interactions of the experimental building's users of the Solar Energy and Building Physics Laboratory (LESO), Ecole Polytechnique Fdrale de Lausanne (EPFL), and a discomfort probability is derived as a function of the horizontal workplane illuminance. This discomfort probability is very high (0.5-1.0) for an illuminance below 200 lx; it reaches a global minimum (about 0.3) at 500 lx, and then increases gradually for larger illuminances until it reaches 1.0 again close to 3000 lx.