Find all pairs $\left(m,n\right)$ of positive integers, with $m,n\geq2$, such that $a^n-1$ is divisible by $m$ for each $a\in \left\{1,2,3,\ldots,n\right\}$.
1. **Identify the problem constraints and initial conditions:**
   We need to find all pairs \((m, n)\) of positive integers such that \(m, n \geq 2\) and \(a^n - 1\) is divisible by \(m\) for each \(a \in \{1, 2, 3, \ldots, n\}\).

2. **Consider a prime \(p\) dividing \(m\):**
   Let \(p\) be a prime that divides \(m\). Since \(a^n - 1\) must be divisible by \(m\) for each \(a \in \{1, 2, 3, \ldots, n\}\), it must also be divisible by \(p\).

3. **Polynomial representation in \(\mathbb{Z}_p[x]\):**
   In the field \(\mathbb{Z}_p\), consider the polynomial \(x^n - 1\). We can write:
   \[
   x^n - 1 = (x-1)(x-2)\ldots(x-n) \pmod{p}
   \]
   This implies that the product of the terms \((x-1), (x-2), \ldots, (x-n)\) is congruent to \(x^n - 1\) modulo \(p\).

4. **Sum of the roots modulo \(p\):**
   The sum of the roots of the polynomial \((x-1)(x-2)\ldots(x-n)\) is:
   \[
   1 + 2 + \ldots + n = \frac{n(n+1)}{2}
   \]
   For this sum to be zero modulo \(p\), we need:
   \[
   p \mid \frac{n(n+1)}{2}
   \]
   This implies that \(n\) must be of the form \(p-1\) (since \(n = p+1\) is impossible as it would make \(n\) larger than \(p\)).

5. **Form of \(m\):**
   Since \(m\) must be divisible by \(p\) and \(a^n - 1\) must be divisible by \(m\) for all \(a \in \{1, 2, 3, \ldots, n\}\), we conclude that \(m\) must be a power of \(p\), i.e., \(m = p^k\).

6. **Verification using polynomial properties:**
   To verify, consider the polynomial \(F(x) = \prod_{d=1}^n (x-d)\) modulo \(p\). If \(F(x) \not\equiv x^n - 1\) in \(\mathbb{F}_p[x]\), then subtracting them gives a polynomial of degree \(n-1\) having \(n\) zeroes modulo \(p\), which contradicts Lagrange's Theorem. Thus, all coefficients of \(F(x)\) except the coefficient of \(x^n\) and the constant term must be divisible by \(p\).

7. **Conclusion:**
   The only solutions are \((m, n) = (p, p-1)\).

The final answer is \( \boxed{ (m, n) = (p, p-1) } \).