When I downloaded the game I forgot to switch off my friend's account, does that mean that he owns the game now and I don't? I bought it on my Xbox so I should keep it right?
Purchases are tied to an account, not a device. If you want to verify that you bought something on your Microsoft account, check your order history.
As Alex Myers points out, you can verify which account the game was purchased on by checking the order history. After checking which account the game was purchased on, there are one of two things that can be done:
- If the game was purchased on your account, you do not need to do anything.
- If the game was purchased on your friends account, you can submit a digital product refund.
If the latter, you can follow the instructions on Microsoft's support site on how to fill out and submit the refund request. Without submitting a request, I did a test run to see how the process would go. During the Q&A, one of the options you can do is Accidental Purchase -> Used Wrong Account.
Since this is your friends account, you may need them with you in order to prove they are the owner of the account. After everything is good and the request is submitted, it may take up to 72 hours to hear from Microsoft's Support team.