The century-old extremal problem, solved by Carathéodory and Fejér, concerns a non-negative trigonometric polynomial $T(t) = a_0 + \sum\nolimits_{k = 1}^n {a_k} \cos (2\pi kt) + b_k\sin (2\pi kt){\ge}0$, normalized by a0=1, where the quantity to be maximized is the coefficient a1 of cos (2π t). Carathéodory and Fejér found that for any given degree n, the maximum is 2 cos(π/n+2). In the complex exponential form, the coefficient sequence (ck) ⊂ ℂ will be supported in [−n, n] and normalized by c0=1. Reformulating, non-negativity of T translates to positive definiteness of the sequence (ck), and the extremal problem becomes a maximization problem for the value at 1 of a normalized positive definite function c: ℤ → ℂ, supported in [−n, n]. Boas and Kac, Arestov, Berdysheva and Berens, Kolountzakis and Révész and, recently, Krenedits and Révész investigated the problem in increasing generality, reaching analogous results for all locally compact abelian groups. We prove an extension to all the known results in not necessarily commutative locally compact groups.