Streptococcus agalactiae is a primary pathogen associated with subclinical mastitis in dairy herds, requiring accurate identification and characterization for effective management due to its highly contagious nature. This study evaluated the use of Matrix Assisted Laser Desorption/Ionization Time-of-Flight Mass Spectrometry (MALDI-TOF MS) for grouping S. agalactiae isolates from subclinical mastitis in cattle and buffaloes associating the antimicrobial susceptibility profiles of the isolates with the grouping results. A total of 198 milk samples were collected from three farms (Farm A: 67 cow isolates, Farm B: 101 cow isolates, Farm C: 30 buffalo isolates). Antimicrobial susceptibility testing using the Minimum Inhibitory Concentration (MIC) method was performed for 10 antimicrobials. High sensitivity (>90 %) was observed for ceftiofur, penicillin, oxacillin, amoxicillin, cefquinome, gentamicin, and cefoxitin, while low sensitivity (<15 %) was detected for enrofloxacin and cephalexin. Clustering was conducted using Random Amplified Polymorphic DNA (RAPD) and grouped by MALDI-TOF MS. RAPD identified 33 clusters at an 80 % similarity breakpoint, while MALDI-TOF MS identified 8 distinct groups. MALDI-TOF MS successfully grouped all isolates, whereas RAPD clustered only 100. Both methods grouped isolates from the same herd with similar susceptibility profiles. These findings highlight the use of MALDI-TOF MS for rapid grouping pathogens but emphasize differences when compared to RAPD.