Oh boy, another person who wants to sue their parole officer. If your friend exhibited a bad attitude, or gave this officer of the court a bad feeling, or if they found the story that was told about him by someone else believable, they can violate him. It's up to their judgment. Drug tests can be beaten. Just because he passed a drug test does not give him the "right" to remain out of jail.
Your friend is in the legal system because he broke the law. Now this officer of the court can do whatever they think is best with him. He sort of lost his rights in this situation when he was sentenced and assigned to a parole officer.