SUMMARY The cellular architecture of a tumor, particularly immune composition, has a major impact on cancer outcome, and thus there is an interest in identifying genes that control the tumor microenvironment (TME). While CRISPR screens are helping uncover genes regulating many cell-intrinsic processes, existing approaches are suboptimal for identifying gene functions operating extracellularly or within a tissue context. To address this, we developed an approach for spatial functional genomics called Perturb-map, which utilizes protein barcodes (Pro-Code) to enable spatial detection of barcoded cells within tissue. We show >120 Pro-Codes can be imaged within a tumor, facilitating spatial mapping of 100s of cancer clones. We applied Perturb-map to knockout dozens of genes in parallel in a mouse model of lung cancer and simultaneously assessed how each knockout influenced tumor growth, histopathology, and immune composition. Additionally, we paired Perturb-map and spatial transcriptomics for unbiased molecular analysis of Pro-Code/CRISPR lesions. Our studies found in Tgfbr2 knockout lesions, the TME was converted to a mucinous state and T-cells excluded, which was concomitant with increased TGFβ expression and pathway activation, suggesting Tgfbr2 loss on lung cancer cells enhanced suppressive effects of TGFβ on the TME. These studies establish Perturb-map for functional genomics within a tissue at single cell-resolution with spatial architecture preserved.