A minimal sample app using ADAL.JS and plain old vanilla JavaScript to obtain an access token from Azure Active Directory and use that access token to make an API request. In this case, the API we're requesting a token for is the Microsoft Graph API, which is used to retrieve the signed-in user's basic profile.
You can see (and test) this live at: https://bl.ocks.org/psignoret/raw/50e88652ae5cb6cc157c09857e3ba87f/
Thanks for this sample which is working on the first try while the official doc at https://github.com/AzureAD/azure-activedirectory-library-for-js is full of typos and missing comments/examples!