Knowledge on the intake and diet composition is a key to efficiently and sustainably drive ruminant production systems. Near infra-red spectroscopy of fecal samples (F.NIRS) has been proposed as a tool to estimate intake, diet composition and digestibility of ruminants. This study was aimed at ascertaining if F.NIRS can precisely and accurately predict 1) individual dietary intake and composition in dairy sheep fed mixed diets in confinement; 2) group dietary intake and composition in grazing dairy ewes using spot sampled faeces. We used two main datasets consisting of pairs of NIRS fecal spectra and reference values for intake, nutrient digestibility and composition of the diet: STALL, based on the results of digestibility trials carried out on a total of 120 sheep individually fed mixed diets including fresh forages, hays and concentrates (29 diets) and GRAZE based on results of already published grazing experiments. GRAZE encompassed a total of 102 pairs of group fecal spectra and group reference values regarding 6 grazing treatments differing in forage species, supplementation type and access time to pasture, in which reference data were obtained by double weighing procedure for herbage intake and hand-plucking for herbage composition. Group fecal samples were collected the day after. Data of the two datasets were separately used to calibrate F.NIRS using partial least square regression analysis and subsequent cross-validation. The quality of calibrations was evaluated using the ratio performance deviation (RPDcv). The diet attributes showing RPDcv in a range good to excellent (RPD > 3) in cross-validation were submitted to a validation exercise, on a subset of data previously excluded from calibration. Validation performance were evaluated as RPDval. Under confined conditions, individual herbage intake was predicted with good precision R2val = 0.90 and accuracy, SEP = 11.6% (RDPval = 3.2). The intake of hay was also well predicted (R2val = 0.97, SEP = 9.9%, RPDval = 4.6), whereas that of concentrates was just fairly predicted with R2val = 0.88 but a lower accuracy (SEP = 26.7%, RPDval = 2.9). The estimation of individual diet composition (% ingredients) was excellent for herbage and hay and good for concentrate, with R2val = 0.97, SEP = 11.2% and RPDval = 4.9 for hay; R2val = 0.97, SEP = 6.7% and RPDval = 5.5 for herbage; and R2val = 0.95, SEP = 26.7% and RPDval = 4.5 for concentrates. Prediction of nutrient proportion in the diet (% DM) was good for NDF, ADF, EE (RPDval ≥ 3) but inadequate for NFC (RPDval = 1.5). Cross-validation models were rather imprecise for CP and OM. Individual digestibility coefficients were poorly estimated in cross-validation, being the best models those estimating the digestibility of NFC (R2cv = 0.83, SECV% = 2.3, RPDcv = 2.4) and ADF (R2cv = 0.81, SECV% = 9.3, RPDcv= 2.3). Under grazing conditions, after cross-validation all models showed RPD < 3. The group intake of herbage was estimated with a modest precision and accuracy (R2cv = 0.75, SECV% = 14.2, RPDcv = 2.0). The proportion of herbage in the diet and its NDF content showed a higher accuracy, and equal or better precision, although models were adequate only for rough screening (RPDcv = 2 and 2.3, respectively). To conclude, this research confirms for dairy sheep the usefulness of F.NIRS to estimate individual intake and individual diet composition in ruminants fed mixed diets in confinement. Moreover, this study shows a modest cross-validation performance of F.NIRS for estimating group average proportion of herbage and NDF in the diet of grazing ewes by spot-sampling their faeces. Further validation of these models is needed to assess the applicability of the above results to farm conditions.