How can I find the specific endomorphism in a supersingular elliptic curve?

Let $E$ be a supersingular elliptic curve. As we know the endomorphism of $E$ is an order in a quaternion algebra. Suppose that $End(E)=\mathcal{O}$ and $a\in \mathcal{O}$. How can I find the endomorphism $\phi\in End(E)$ which corresponds to $a$?