Skip to content
This repository has been archived by the owner on Jun 26, 2021. It is now read-only.

ADAL Basics

Navya Canumalla edited this page Nov 14, 2018 · 10 revisions

Prerequisites

Before using ADAL JS, follow the instructions to register your application on the Azure portal. Also, make sure to enable the OAuth 2.0 implicit flow by setting the property oauth2AllowImplicitFlow to true by editing your application manifest on the portal. Implicit flow is used by ADAL JS to get tokens.

Installation

Please refer Installation

Include a reference to ADAL (In JavaScript)

You can use ADAL JS as follows in a plain JavaScript application without any frameworks.Include a reference to adal.js in your main application index page before your application scripts.

    <script src="App/Scripts/adal.js"></script>
    <script src="App/Scripts/app.js"></script>

Initialization of ADAL

Please refer Configure AuthenticationContext

Calling Login APIs

Please refer Login APIs

Calling Acquire Token APIs

Please refer Acquire tokens APIs

samples

Please refer sample for a full implementation example.