This Documentation + Example shows you how you can access the minecraft account of a user through their xBox account.
Table of contents
- Register a new Azure app
- Example
It is assumed that you are somewhat familiar with oAuth, and you also have an Azure account. If you don't have an Azure Account yet, you have to create one (to create an account a credit card is required) Here is a Tutorial that explains how to create an Azure Account. Once an account has been created, you can start registering the app.
Since Microsoft itself has documentation on how to register an app , I will only add a few things here.
Note: the Nr refers to the respective number in the Microsoft documentation
- Nr 3. Supported account types here it's important to use Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox) otherwise the xBox services can not be used.
- Nr 6. Since I am going to use the MSAL Library with Node and Express in my Example, it is important to use web as the platform.
- Nr 7. Since apps of type web are considered confidential (see here Public client and confidential client applications) a client_secret must be created, this will be needed later in the application.
More advanced Setup (doesn't refer to the documentation)
I wrote a simple node express example that uses the MSAL JS Library to authenticate the user. At this point I would also like to refer to this documentation. This documentation describes in more detail how the authentication flow works, it also includes some examples in different programming-languages (bottom of the page).
- https://wiki.vg/Microsoft_Authentication_Scheme
- https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-node
- https://docs.microsoft.com/en-US/azure/active-directory/develop/reference-v2-libraries
- https://docs.microsoft.com/en-us/advertising/guides/authentication-oauth-register?view=bingads-13
- https://docs.microsoft.com/en-US/azure/active-directory/develop/msal-client-applications
- https://docs.microsoft.com/en-US/azure/active-directory/develop/msal-client-application-configuration#authority
- https://docs.microsoft.com/en-US/azure/active-directory/develop/quickstart-v2-nodejs-console
- https://docs.microsoft.com/en-US/azure/active-directory/develop/reference-v2-libraries