Raw milk is a continued threat to public health due to possible contamination with zoonotic pathogens. Enterocytozoon bieneusi is one of the most prevalent pathogenic fungi in a wide range of vertebrate hosts, causing diarrheal disease. Although there has been some evidence, the role and potential risk of raw milk of dairy animals in the transmission dynamics of E. bieneusi is not clear. Therefore, we aimed to determine the occurrence and genotypes of E. bieneusi in raw milk of dairy animals in several farms of the Central Anatolia Region. We also investigated if there is a relation between the presence of E. bieneusi and mastitis. Genomic DNA5 from a total of 450 raw milk including 200, 200 and 50 samples from cattle, sheep and water buffalo respectively were analyzed using nested PCR, targeting the internal transcribed spacer of E. bieneusi. Totally milk samples of 9 (4.5%) dairy cattle, 36 (18.0%) sheep, and 1 (2.0%) water buffalo were PCR-positive. A significant relationship was determined between mastitis and the presence of E. bieneusi. Sequence analysis revealed the presence of eight genotypes: two known (ERUSS1, BEB6) and six novel genotypes (named as TREb1 to TREb6). The genotype ERUSS1 and BEB6 were the most common genotypes, found in all cattle and sheep farms. Phylogenetic analysis clustered all the identified genotypes in Group 2. This study provides novel findings that contribute to the transmission dynamics and molecular epidemiology of E. bieneusi. Our study also highlighted the potential risk of raw milk for public health with respect to microsporidia infections.