Translation:I am thanking the groups.
Does this mean that anything after "danken" takes the dative case?
Yes, danken only takes an indirect (dative) object.
And here is a list of other verbs that go with dative: http://goo.gl/KlN6m
How would be "I thank the group"? Isn't it the same?