Let $A \subseteq B$ be an integral extension of rings. Let $b \in B$, and let $b^n+a_1b^{n-1}+\dots+a_{n-1}b+a_n=0$ be an integral dependence relation for $b$, with $a_1,\dots,a_n\in A$.
Given a prime ideal $\mathfrak{p}$ in $B$, I am trying to prove that $b\in\mathfrak{p}$ if and only if $a_1,\dots,a_n\in \mathfrak{p}\cap A$. I have managed to prove the implication $\Leftarrow$, but I am stuck with the other: I am only able to show the claim for $a_n$.
In particular, I am interested in the case where $A$ is the subring of invariants under some group action on $B$, but since I proved one implication in this more general setting I suspect that the other direction may hold too under these assumptions.