Questions tagged [adal.js]

adal.js is a new library meant to help you to take advantage of Azure AD to secure your SPA apps and consume Web API from JavaScript.

adal.js is a new library meant to help you to take advantage of Azure AD to secure your SPA apps and consume Web API from JavaScript.

https://github.com/AzureAD/azure-activedirectory-library-for-js

288 questions
19
votes
3 answers

How to integrate azure ad into a react web app that consumes a REST API in azure too

I have one web app which is React, and I already configured Azure AD Authentication for the web app itself. Its 100% Client site app, no server side components. I used this component: https://github.com/salvoravida/react-adal My code is as…
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
16
votes
4 answers

Adal.js does not get tokens for external api endpoint resource

I'm trying out adal.js with an Angular SPA (Single Page Application) web site that gets data from an external Web API site (different domain). Authentication against the SPA was easy with adal.js, but getting it to communicate with the API is not…
Bjørn F. Rasmussen
  • 359
  • 1
  • 4
  • 16
9
votes
1 answer

How to specify Resource URI when acquiring access token for Azure AD V2 endpoint?

I have used ADAL.js in a previous project which supported only work accounts and am able to successfully acquire idtokens and then accesstokens to an API (ResourceURI: "https://myresource.com"). Works fine. Now, I am trying to use MSAL.js for…
Sat Thiru
  • 922
  • 2
  • 10
  • 20
9
votes
2 answers

Angular5 HttpInterceptor depending on the result of an Observable

I am trying to implement using Angular5 an HttpInterceptor to inject an Authorization header in all HTTP requests. I rely on a third party library (ADAL, here called AuthService) that exposes a acquireToken() method to get the token to be used for…
9
votes
2 answers

Using Angular2 to authenticate against Azure AD

I am using Angular2 and want to authenticate the user against an Azure AD. I found ADALjs but they cater for Angular1 only, I also found this https://www.npmjs.com/package/angular2-adal#adalService, but this seems still in the initial stages. What…
user3547774
  • 1,621
  • 3
  • 20
  • 46
8
votes
1 answer

How to get current user roles with ADAL JS

I have the following react app, which is a template from envato. I have integrated Azure AD authentication using this component and it works perfectly fine: https://github.com/salvoravida/react-adal However I want to create ROLES, and I want to be…
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
8
votes
2 answers

adal-angular js Error: Failed to load template

I used adal-angular js to protect my routes. $routeProvider. when("/dashboard", { templateUrl: "Views/Dashboard.html", controller: "DashboardController", requireADLogin: true }) But when Adal getting token, I have an error in…
Oleg
  • 1,467
  • 4
  • 26
  • 39
7
votes
0 answers

How to enforce Azure AD SSO between iOS native app and Safari browser?

We are using https://github.com/AzureAD/azure-activedirectory-library-for-objc to enable Azure AD login for our native iOS app. We have a webpage (javascript) which also uses ADAL.js to enable Azure AD login (same AD) for SSO. Now, suppose a user is…
Avinash Sonee
  • 1,701
  • 2
  • 15
  • 17
7
votes
2 answers

Microsoft Teams Adal silent Authentication fail (iframe sandbox)

We have developped a custom tab for Microsoft Teams and would like to authenticate users silently, using Adal as describe in this article https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/authentication/auth-silent-aad It works fine…
7
votes
2 answers

access_token same as id_token when trying to acquire access token with ADAL.js AuthenticationContext?

I am authenticating my Single Page App (Angular4) with Azure AD, and using Adal.js for the same. On the login page, I click a button that redirects to Microsoft AAD and upon successful login it redirects back to application home page, and receives…
Rishabh
  • 900
  • 10
  • 30
7
votes
1 answer

Module not found: Error: Cannot resolve module 'fs' in

I am trying to integrate ADAL JS sample code: https://github.com/AzureAD/azure-activedirectory-library-for-nodejs/blob/master/sample/client-credentials-sample.js into a sharepoint framework client webpart: my code is very simple, I already installed…
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
6
votes
2 answers

How to load adal.js in webpack inside Angular 2 (Azure-AD)

Inside my NG2 project, if I write: import adal from 'adal-angular'; it gives me 'adal is undefined'. Why is that? I want to use adal.js inside my angular 2 project. I already have run npm install adal-angular --save npm install @types/adal…
hannes neukermans
  • 12,017
  • 7
  • 37
  • 56
6
votes
1 answer

MVC AD Azure Refresh Token via ADAL JavaScript Ajax and KnockoutJs

There is an inherent design flaw in the type of MVC application I have built and I believe I'm not the first to realize. I have an MVC 4 Application that utilises AD Azure Authentication that was introduced to the application in the following…
5
votes
1 answer

authContext.login() causes “ Refused to display ‘login.microsoftonline.com…’ in a frame because it set ‘X-Frame-Options’ to ‘deny’ ”

I’m currently trying to implement my website into Microsoft Teams. For that I’ve made a custom app with App Studio. In that app I have a tab to direct to my website. This website has a button that executes a code in which it tries to…
user11668595
5
votes
0 answers

Silent authentication for own website inside tab of custom Teams app

After two months of experimenting with Teams Authentication via adal.js and msal.js and failure, I’m close to giving up. So I really need your help. Basically I need to “silently” authenticate the logged in Teams User for my own website (tab) inside…
user11668595
1
2 3
19 20