I have bought the game through a site and redeemed the key in Microsoft Store. I have played it for 3 hours but then took a break. After I opened the game it said this "UNABLE TO VERIFY GAME OWNERSHIP. Sorry, we're currently unable to verify that you own Minecraft Dungeons. Please make sure that you have working internet connection and try again." 
Thank you for your report!
We're tracking this issue in
MCD-1230, so this ticket is being resolved and linked as a duplicate.If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki – 📖 FAQs