Although I don't think the Supreme court has ruled definitively, other courts generally hold that DNA isn't covered by the 5th, but is covered by the 4th. This prosecutor and the police had a signed court order. They were just enforcing the court's order, albeit in an unconventional way.
If its court ordered its court ordered but using an electronic stun to gather evidence is unusual punishment which is also unlawful. A Taser was invented to be a non lethal WEAPON to subdue suspects that otherwise could be shot.