First, note that by the pigeonhole principle, $\renewcommand{\Pr}{\mathbb P}\Pr(X > n) = 0$.
Next let
$$
A_m := \{\text{no duplicates in first $m$ trials}\}
$$
and
$$
B_{m,i} := \{\text{The value $i$ has been seen in the first $m$ trials}\} \>.
$$
Then, by decomposing into disjoint sets and employing symmetry, we have
$$
\Pr(X > m) = \Pr(A_m (B_{m,1}^c \cup B_{m,2}^c)) = \Pr(A_m B_{m,1}^c B_{m,2}^c) + 2 \Pr(A_m B_{m,1} B_{m,2}^c) \>.
$$
But the second probability on the right-hand side is (again, by symmetry)
$$
\Pr(A_m B_{m,1} B_{m,2}^c) = m \Pr(A_m \cap \{\text{$1$ is in the first position}\} \cap B_{m,2}^c) \>.
$$
These two probabilities are easy to find by simple (combinatorial) arguments.
$$
\Pr(A_m B_{m,1}^c B_{m,2}^c) = \frac{(n-2) (n-3) \cdots (n-m-1)}{n^m}
$$
and
$$
\Pr(A_m \cap \{\text{$1$ is in the first position}\} \cap B_{m,2}^c) = \frac{1 \cdot (n-2) \cdots (n-m)}{n^m} \>.
$$
Thus, for $1 \leq m < n$,
$$
\Pr(X > m) = \frac{(n-2)!\,(n+m-1)}{n^m (n-m-1)!} = \frac{n!}{(n-m)!\, n^m}\left(1 - \frac{m(m-1)}{n(n-1)}\right) \>.
$$