Resistance to third-generation cephalosporins and other beta-lactam antibiotics is of major concern for animal and human health. Knowledge of the prevalence of resistant bacteria in primary production is an important element to estimate transmission along the stages in the food production chain and the exposure of the human population. The primary objective of this study was to determine the prevalence of cefotaxime-resistant commensal E. coli in dairy and beef cattle production units throughout Germany. Secondarily, the association between management factors and the presence of cefotaxime resistance was investigated. In total, 60 beef cattle and 52 dairy cattle production units all over Germany were included. Cefotaxime-resistant E. coli were isolated from at least one sample in 70% (95% CI: 58-83%) of the farms keeping beef cattle and 85% (95% CI: 75-94%) of the farms keeping dairy cattle. The sample prevalence was 35% (161/455; 95% CI: 31-40%) and 48% (156/323; 95% CI: 43-54%), respectively. Most factors associated with resistance to cefotaxime indicate that less intensive production results in a lower number of positive samples. For beef cattle, antimicrobial treatment of the whole animal group was significantly associated with an increased proportion of samples containing cefotaxime resistant E. coli. In addition, our results indicate that better hygiene management could improve the resistance situation on cattle farms.