Yes. In California, minors can be used by peace officers to enforce the law and catch individuals who sell alcohol to minors. Minors participating in this enforcement are immune from prosecution. Note that tricking suspects into committing a crime is not entrapment as long as the suspect was predisposed to committing the crime.