AngularJS Module for Microsoft Azure Active Directory Authentication

Play AngularJS Module for Microsoft Azure Active Directory Authentication

The Discussion

  • User profile image

    Hi, Thanks guys, this was very useful, specially the white-boarding..
    Do I need to have AngularJS for this to work? How can i Initial and inject the httpProvider if i am not using Angular and have just a simple html page?

  • User profile image

    The $httpProvider is an angular service so you cannot use it outside of angular.

  • User profile image

    I see the identity guru still hasn't been to the barbers :) Disappointed I couldn't attend DEV-B322...

  • User profile image

    How do we add additional claims in the ADAL.js scenario? Is there a way similar to using the ClaimsTransformationModule to add additional claims?

  • User profile image

    Thanks Guys,
    I actually got it working without using Angular.
    Thanks Again

  • User profile image
    Mike Walsh

    Good work guys! Is there any easy way to implements this, or Azure AD in general in a scenario where we do not want to redirect to a login page? In our SPA, we want to be able to have our own login dialogue, in app. Basically, we want to skip login redirect and just send the username/password through a POST to a secure REST api with CORS. Suggestions?

  • User profile image
    Sam Dzirasa

    What changes did you make to get it to work without using Angular?

  • User profile image
    Aram Koukia

    For the SignIn i put and element and called the login like this:
    $('#SignIn').on('click', function () {
    and this for Sign out:
    $('#SignOut').on('click', function () {

    and in the Secured html page used this to show the user name or show the auth error:

    $(document).ready(function () {

    if (authContext.getLoginError() == ""){
    window.location = '/Home/LoginError?error=' + authContext.getLoginError();

  • User profile image

    Thanks Guys,will this also work for on perm. active directory

  • User profile image

    @Dickson:Agree with you. To my mind very good to see support for this given the SharePoint Hosted App based Single Page Apps model being developed.

Add Your 2 Cents