Invariance of scalar products on Lie algebras

If I have a Lie algebra [tex] \mathfrak{g} [/tex] with an invariant (under the adjoint action ad of the Lie algebra) scalar product, what are the conditions that this scalar product is also invariant under the adjoint action Ad of the group? For instance, the Killing form is invariant under both actions. Is this also true in general?

My idea for the proof would be the following: If I know that the scalar product is invariant under Ad, then for any fixed vectors v,w in the Lie algebra, the function
[tex] f: G \rightarrow \mathbf{R} [/tex]
[tex] \ g \mapsto \langle Ad(g)v, Ad(g)w \rangle [/tex]
is constant, i.e.
[tex] f(g)=f(1)=k [/tex]
By differentiating this function, I should be able to obtain the converse of the statement I need. I hope that this can be used to derive a condition for the invariance under Ad, given the invariance under ad.

I would be grateful for any hints since I'm stuck with this very crude ansatz.

If the group is connected, then ad-invariance will automatically imply Ad-invariance. Basically, ad-invariance implies that this function f that you've defined is locally constant (since its differential will be 0). If G is connected, then locally constant implies constant.

If the group is connected, then ad-invariance will automatically imply Ad-invariance. Basically, ad-invariance implies that this function f that you've defined is locally constant (since its differential will be 0). If G is connected, then locally constant implies constant.