Two possibilities come to my mind.
One is your Xbox gold account, has it expired/do you have one? Most if not all Xbox one games require you to have a gold account to play online.
Another is the Xbox 1 systems parental settings, if you have any on. If they are on or somehow got turned on, I can see them blocking that.