In order to get started you need to have an Microsoft Account (personal, company or school) You can easily create one with outlook.com
Once you’re done with your account login to this site: https://apps.dev.microsoft.com/ and you’ll see the following:
Click on the button Add an app in order to create a new APP to retrieve your APP ID and Client ID
now you will need to give it a name:
We’ll call it “TestApp” and click on Create application
You will be redirected to the App registration site, if there’s a popup for azure, we don’t need it right now.
You can manage it in Azure but in this tutorial we will continue here and click Not now.
We have an application ID and can now generate Password and Key Pairs. For using GRAPH you’ll need to generate a password.
This will only be shown once, so make sure you note it down:
Now we need to set the Platform that our APP will run.
As we have a web application, we will choose WEB
Allow the implicit Flow.
The redirect URL that is shown is important for our callbacks from GRAPH so set it where you have your callback handler inside your APP
When working with GRAPH you’ll need permissions for your APP depending on what you’re doing, beginning with User.Read, Profile, Openid is never wrong. Let’s assume we want to use OneDrive to upload files, in that case we’ll also need Files.ReadWrite.
Once we have setup everything we will save and can now use our APP ID and the password in our APP to retrieve a token.
Congratulations, you’re done!