Skip to content

Latest commit

 

History

History

vanilla

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Vanilla sample

A minimal sample which shows how to use @azure/ms-rest-browserauth in a browser application.

How to run

Setup in Azure portal

  • Register a single page application in the Microsoft identity platform
  • Configure the app registration with a redirect URI to specify where the Microsoft identity platform should redirect the client along with any security tokens.
  • In this sample, we list the subscriptions available in your Azure account. For this to work, you need to ensure that your application has the right permission for the Azure Service Management API. To do so, follow the below instructions:
    • In your app registration in the Azure portal, go to API Permissions
    • Click on Add a permission
    • Select Azure Service Management
    • Check the box for user_impersonation permission
  • Keep in mind that the account administrator may need to grant admin consent for the Default Directory.

Update and run the sample

  • Replace the placeholder values in index.html with your own clientId and tenant
  • Run npm install, npm start, and navigate to localhost:3000