Infections by opportunistic fungi have traditionally been viewed as the gross result of a pathogenic automatism, which makes a weakened host more vulnerable to microbial insults. However, fungal sensing of a host's immune environment might render this process more elaborate than previously appreciated. Here we show that interleukin (IL)-17A binds fungal cells, thus tackling both sides of the host-pathogen interaction in experimental settings of host colonization and/or chronic infection. Global transcriptional profiling reveals that IL-17A induces artificial nutrient starvation conditions in Candida albicans, resulting in a downregulation of the target of rapamycin signalling pathway and in an increase in autophagic responses and intracellular cAMP. The augmented adhesion and filamentous growth, also observed with Aspergillus fumigatus, eventually translates into enhanced biofilm formation and resistance to local antifungal defenses. This might exemplify a mechanism whereby fungi have evolved a means of sensing host immunity to ensure their own persistence in an immunologically dynamic environment.