I was going to blog about this some time ago, but it slipped my mind. Better late than never.
I bought an XBox One, and some games. Then I looked for secondhand games, and bought one or two, mostly stuff you can’t buy new anymore, like Halo remastered and Star Wars – Battlefront.
The Star Wars disc turned out to be faulty. The shop would happily take it back, but didn’t have a replacement they could give me.
It turns out that, provided it can be at least partially read, you can use the disc to prove to the XBox that you own the game, then install it off the network.
It’s easy: pop the disc in, cancel out of the installation, then go to the XBox store and find the same game. It’ll give you an install option, which will download it from the servers.
Unlike a game bought online, you’ll still need the disc in the console to play the game.
(Source: This Reddit tip)