For a complete Cartan foliation (M,F) we introduce two algebraic invariants g0(M,F) and g1(M,F) which we call structure Lie algebras. If the transverse Cartan geometry of (M,F) is effective then g0(M,F) = g1(M,F). Weprove that if g0(M,F) is zero then in the category of Cartan foliations the group of all basic automorphisms of the foliation (M,F) admits a unique structure of a finite-dimensional Lie group. In particular, we obtain sufficient conditions for this group to be discrete. We give some exact (i.e. best possible) estimates of the dimension of this group depending on the transverse geometry and topology of leaves. We construct several examples of groups of all basic automorphisms of complete Cartan foliations.