A novel resonance method for determining the complex permittivity of materials in the X-band is proposed. A distinctive feature of this method is that the sample under test, located in a radio-transparent isotropic and homogeneous dielectric matrix, is both a local inclusion and the excitation element of the resonance in the microwave module 'waveguide–dielectric matrix–inclusion'. The complex permittivity of an inclusion is determined by comparing the measured resonance frequency and quality factor with the computed database value. The permittivity and loss factor of microwave ceramics, natural granite and ferrite are investigated, as well as crystals of lead fluoride PbF2 doped with holmium trifluoride HoF3 and erbium fluoride ErF3 of different concentrations. The method allows the permittivity and loss tangent to be determined with uncertainties of 0.1% and 5%, respectively.