I have created a new application in Azure AD using the AAD Graph API. (code)
Unfortunately it doesn\'t let my client access the requested resources until I have been to
Apart from RasmusW's answer above, there a few more things that you might have to do depending on what you are trying to achieve.