Why can't I play online?
E.g.: The Escapists 2: "Function not available due to Xbox Live account settings"
I'm assuming you are writing online game that you have Xbox Live Gold?
Otherwise, some privacy settings prevent online gaming. Take a look at the individual settings.
I noticed that I no longer have xbox live gold (expired), but before that it didn't work for games like e.g. It worked with Halo 5 and secret neighbor but with Human Fall flat.
And I've already looked at the settings.