Cancer cells producing ligands for the immune checkpoint molecules PD-1 and CTLA-4 is an important mechanism of tumour immune resistance. Here authors show that BTNL2 expression on cancer cells generates a dysfunctional tumour immune microenvironment via promoting IL-17A-producing γδ T cells.