Reputation is a key component in social interactions of group-living animals and appears to play a role in the establishment of cooperation. Animals can form reputations of individuals by directly interacting with them or by observing them interact with a third party, i.e., eavesdropping. Previous research has focused on whether dogs (Canis lupus familiaris) can eavesdrop on humans because of their ability to cooperate with humans, however the results are mixed and if they can eavesdrop, it is unknown whether this ability evolved during the domestication process or whether it was inherited from their ancestor, wolves (Canis lupus). Our study investigated whether equally hand-raised, pack-living dogs and wolves can form reputations of humans in a food-giving situation through indirect and/or direct experience. The experimental procedure comprised three parts: baseline (to test whether the subject preferred a person prior to the experiment), observation and testing. In the observation phase, the subject observed two humans interact with a dog demonstrator–one acted generously and fed the dog, and the other acted selfishly and refused to feed the dog. The subject could then choose which person to approach in the test phase. In the following experience phase, the animals interacted directly with the same two humans who behaved either in a generous or selfish manner. Then, they were again given a choice whom to approach. We found that dogs and wolves, at the group level, did not differentiate between a generous or selfish partner after indirect or direct experience, but wolves were more attentive towards the generous person during the observation phase and some dogs and wolves did prefer the generous partner, at least after indirect and direct experience was combined. Our study suggests that reputation formation may be more difficult than expected for animals and we emphasise the importance of context when studying reputation formation in animals.