The immune system comprises a collection of specialized cells and organs that fight infections and can survey cancer cells. Immune responses to pathogens and tumors are highly coordinated events that take place in complex and specialized tissue microenvironments. An integrated view of innate and adaptive immune responses to infections and cancer requires a better understanding of how immune cells communicate and fulfill their task in vivo. In addition, it is essential to unravel how pathogens and tumor microenvironment subvert their functions. Recent progresses in intravital two-photon imaging offer a novel perspective to address some of these critical issues in physiological settings. By further developping functional in vivo imaging, we aim at identifying critical aspects of T cell and NK cell activation and function during tumor growth, during infection by an intracellular parasite and during transplantation. Elucidating the fundamental mechanisms underlying the regulation of innate and adaptive immune responses in vivo will delineate basic principles to develop or improve immunotherapeutical strategies to treat cancer and infectious diseases.