Some verbs can take either に or と to mark the partner who is involved in the action, but the meaning could differ depending on which particle is used. と implies a two-way or mutual action, and に implies a one-way action.
わたしは 先生に そうだんしました。
I consulted my teacher./I went to my teacher for advice.
わたしは ともだちと そうだんしました。
I consulted with a friend./I discussed it with a friend.