Is the group cyclic?
Husk, 11 10 9 bytes

VS≡`ȯU¡!1


1-based.
Returns the index of a generator if one exists, 0 otherwise.
Try it online!

Explanation

V          Does any row r of the input satisfy this:
      ¡!    If you iterate indexing into r
   `    1   starting with 1
    ȯU      until a repetition is encountered,
 S≡         the result has the same length as r.