The closest word I can think of is a sycophant but that’s too strong word and not exactly what I’m looking for. The word I’m thinking of has negative connotations and it’s for someone who is friends with different groups but only at a superficial level and isn’t necessarily honest about who all they’re friends with. This person would be seen as untrustworthy.
Opportunist
Opportunist is definitely closer to what i’m thinking than sycophant.
Fair Weather Friend has gently negative connotations
Yeah, the good version of someone like that would be a diplomat, but the untrustworthy version is definitely an opportunist.