Differential dijet cross sections in diffractive deep-inelastic scattering are measured with the H1 detector at HERA using an integrated luminosity of 51.5 pb-1. The selected events are of the type ep → eXY , where the system X contains at least two jets and is well separated in rapidity from the low mass proton dissociation system Y. The dijet data are compared with QCD predictions at next-to-leading order based on diffractive parton distribution functions previously extracted from measurements of inclusive diffractive deep-inelastic scattering. The prediction describes the dijet data well at low and intermediate zℙ (the fraction of the momentum of the diffractive exchange carried by the parton entering the hard interaction) where the gluon density is well determined from the inclusive diffractive data, supporting QCD factorisation. A new set of diffractive parton distribution functions is obtained through a simultaneous fit to the diffractive inclusive and dijet cross sections. This allows for a precise determination of both the diffractive quark and gluon distributions in the range 0.05 < zℙ < 0.9. In particular, the precision on the gluon density at high momentum fractions is improved compared to previous extractions. © SISSA 2007.