A lot of people have had trouble getting onto XBL despite their Xbox Ones connecting to the net. I read a lot of ways to fix it but this is the one that worked!
1. Go to settings
2. Go to Network
3. Go to Advanced Settings
4. Go to DNS settings
5. Select Manual
6. Enter Primary DNS 188.8.131.52 and press enter
7. Enter Secondary IP 184.108.40.206 and press enter