The advent of nanosciences calls for the development of local structural probes, in particular to characterize ill-ordered or heterogeneous materials. Furthermore, because materials properties are often related to their heterogeneity and the hierarchical arrangement of their structure, different structural probes covering a wide range of scales are required. X-ray diffraction is one of the prime structural methods but suffers from a relatively poor detection limit, whereas transmission electron analysis involves destructive sample preparation. Here we show the potential of coupling pencil-beam tomography with X-ray diffraction to examine unidentified phases in nanomaterials and polycrystalline materials. The demonstration is carried out on a high-pressure pellet containing several carbon phases and on a heterogeneous powder containing chalcedony and iron pigments. The present method enables a non-invasive structural refinement with a weight sensitivity of one part per thousand. It enables the extraction of the scattering patterns of amorphous and crystalline compounds with similar atomic densities and compositions. Furthermore, such a diffraction-tomography experiment can be carried out simultaneously with X-ray fluorescence, Compton and absorption tomographies, enabling a multimodal analysis of prime importance in materials science, chemistry, geology, environmental science, medical science, palaeontology and cultural heritage.