Advanced materials and processing techniques are based largely on the generation and control of non-homogeneous microstructures, such as precipitates and grain boundaries. X-ray tomography can provide three-dimensional density and chemical distributions of such structures with submicrometre resolution; structural methods exist that give submicrometre resolution in two dimensions; and techniques are available for obtaining grain-centroid positions and grain-average strains in three dimensions. But non-destructive point-to-point three-dimensional structural probes have not hitherto been available for investigations at the critical mesoscopic length scales (tenths to hundreds of micrometres). As a result, investigations of three-dimensional mesoscale phenomena--such as grain growth, deformation, crumpling and strain-gradient effects--rely increasingly on computation and modelling without direct experimental input. Here we describe a three-dimensional X-ray microscopy technique that uses polychromatic synchrotron X-ray microbeams to probe local crystal structure, orientation and strain tensors with submicrometre spatial resolution. We demonstrate the utility of this approach with micrometre-resolution three-dimensional measurements of grain orientations and sizes in polycrystalline aluminium, and with micrometre depth-resolved measurements of elastic strain tensors in cylindrically bent silicon. This technique is applicable to single-crystal, polycrystalline, composite and functionally graded materials.