Background:
Given an elliptic curve $E$, it seems that $max(ord(Aut(E)))$ over the prime 2 is 24, and $(max(ord(Aut(E)))$ over the prime 3 is 12.
The endomorphism algebra of an elliptic curve over $\overline{\mathbb{F}}_p$ is, after tensoring with $\mathbb{Q}$, either an imaginary quadratic field or the unique division algebra $D_p$ which is non-split at $p$ and infinity. So, in order to compute the maximal order of the automorphism algebra, we just compute the units of $D_p$, and then count them.
Here's my question: Given a Shimura variety, how does one compute the maximal order of its automorphism group? I'm particularly interested in the cases of abelian varieties with complex multiplication, and Shimura varieties.
For example, the variety $\mathbb{C}^{\times 3}/ \mathbb{Z}[\zeta_7]^{\times 3}$ where the embedding is given by $\sigma_1 \times \sigma_2 \times \sigma_3: \mathbb{Z}[\zeta_7]^{\times 3} \to \mathbb{C}^{\times 3}$. Here, we look at its automorphisms over $\mathbb{F}_p$ where $p$ is $2$ or $4$ mod $7$.
I have heard that there is a theoremShimura varieties have finite dimensional automorphism groups (analogous to the fact that $Aut(A, p)$ is finite, where $p$ is a polarization of the abelian variety $A$). Is there a general method to calculateWhat is the automorphism group of this as wellShimura variety?