If $x^d \equiv 1 \pmod{p}$ has full number of roots, $d\mid p-1$? Let $p$ be a prime.
What I know is that $d\mid p-1$ then $x^d \equiv 1 \pmod{p}$ has the maximum possible number of roots, that is, $d$.
I am wondering if the converse holds. 
I have searched for $d\not\mid p-1$ that still has $d$ many roots in the equation, but I could not find one up to $p=23$ (unless my calculation was not complete). Is there a counter-example to the converse?

Yes, the converse holds.
We have $x^m \equiv 1 \bmod{p}$ iff $x^d \equiv 1 \bmod{p}$, where $d=\gcd(m,p-1)$.
Moreover, $x^d \equiv 1 \bmod{p}$ has exactly $d$ roots because $\mathbb F_p^\times$ is cyclic.
Therefore, $x^d \equiv 1 \bmod{p}$ has $d$ roots iff $d$ divides $p-1$.
