XCOM 2 on PS4 and Xbox One can only be played multiplayer by two players who have the same version of the game and the same content.
This is automatically handled by matchmaking when playing a Ranked or Quick match.
When you invite a friend to play in a Custom match, both players will need to have the same DLC packs installed in order for a match to be playable