Beneficial soil microbes can enhance plant nutrition and plant defense. Therefroe, their use in sustainable agrculture and horticulture has been advocated as a promising avenue to reduce the input of fertilizers and pesticides. A key challenge is that the effects of these beneficial microbes is often not consistent, but depends on abiotic and biotic environmental conditions (“context-dependency”). The aim of this research is to investigate sources of such context-dependency to help design management practices that enhance the consistency of beneficial microbe effects in sustainable horticulture. Specifically, we investigate the effects of phosphorus nutrition and light quality on the extent to which beneficial microbes (arbuscular mycorrhizal fungi) can enhance tomato resistance to aboveground pests, without impeding the effect of biocontrol agents on the pest organisms. This project is part of a Marie-Curie Innovative Training Network (https://mira.ku.dk/) “Microbe induced resistance to agricultural pests” (MiRA) in which with 11 participating groups from academia and industry investigate the context-dependency of microbe-induced resistance.