Cell shape and function are intimately linked, in a way that is mediated by the forces exerted between cells and their environment. The relationship between cell shape and forces has been extensively studied for cells seeded on flat 2D substrates, but not for cells in more physiological 3D settings. Here, a technique called 3D micropatterned traction force microscopy (3D-µTFM) to confine cells in 3D wells of defined shape, while simultaneously measuring the forces transmitted between cells and their microenvironment is demonstrated. This technique is based on the 3D micropatterning of polyacrylamide wells and on the calculation of 3D traction force from their deformation. With 3D-µTFM, it is shown that MCF10A breast epithelial cells exert defined, reproducible patterns of forces on their microenvironment, which can be both contractile and extensile. Cells switch from a global contractile to extensile behavior as their volume is reduced are further shown. The technique enables the quantitative study of cell mechanobiology with full access to 3D cellular forces while having accurate control over cell morphology and the mechanical conditions of the microenvironment.