The incident happened at a store location in Riverside, the Riverside County Sheriff’s Department confirmed on Twitter on Friday.
Starbucks said the employees on shift the evening of the incident "will not be scheduled to work while we investigate and take the appropriate steps."
"There is simply no excuse for how two Riverside deputies were ignored for nearly five minutes at our store on Thursday evening," Starbucks said. "We are deeply sorry and reached out to apologize directly to them. We take full responsibility for any intentional or unintentional disrespect shown to law enforcement on whom we depend every day to keep our stores and communities safe. No customer, in or out of uniform, should ever have that experience at a Starbucks."
Riverside County Sheriff Chad Bianco charged Starbucks to take action on Twitter on Friday.
"Two of our deputies were refused service at Starbucks. The anti-police culture repeatedly displayed by Starbucks employees must end," he wrote.
Starbucks had apologized for a similar incident in November as well.
An Oklahoma police chief said an officer bought Starbucks for 911 dispatchers working on Thanksgiving only to find that the word “PIG” was printed on the cups’ labels.
Fox News' Gerren Keith Gaynor, Caleb Parke and David Aaro and The Associated Press contributed to this report.