AbstractGross and Zagier conjectured that the CM values (of certain Hecke translates) of the automorphic Green function $$G_s(z_1,z_2)$$
G
s
(
z
1
,
z
2
)
for the elliptic modular group at positive integral spectral parameter s are given by logarithms of algebraic numbers in suitable class fields. We prove a partial average version of this conjecture, where we sum in the first variable $$z_1$$
z
1
over all CM points of a fixed discriminant $$d_1$$
d
1
(twisted by a genus character), and allow in the second variable the evaluation at individual CM points of discriminant $$d_2$$
d
2
. This result is deduced from more general statements for automorphic Green functions on Shimura varieties associated with the group $${\text {GSpin}}(n,2)$$
GSpin
(
n
,
2
)
. We also use our approach to prove a Gross–Kohnen–Zagier theorem for higher Heegner divisors on Kuga–Sato varieties over modular curves.