In spite of the ever-increasing incidence and poor outcome of invasive fungal infections in immune compromisedpatients, there is currently no reliable method to accurately predict the risk, to monitor the outcome and to treatthese infections. Protective immunity against Candida and Aspergillus depends on a highly coordinated interaction between the innate and adaptive immune systems. Genetic and immunological defects in components of these networks result in increased risk of invasive fungal infections among patients undergoing chemotherapy or transplant recipients. We review the most important genetic and immunological factors that influence human susceptibility to Candida and Aspergillus infections and discuss the potential role of basic research to promote precision medicine for infectious diseases. We discuss how immunogenetic studies canhelp to provide tools for improved identification of high-risk patients and the development of tailored antifungal therapies.