Questions tagged [adal]

The Azure Active Directory Authentication Libraries (ADAL) gives you the ability to add support for Microsoft's cloud identity APIs to your application, including support for Office365 and Work Accounts. Supports native clients such as Windows, Windows Phone, iOS, OSX, Android, and Linux and server clients such as Windows Server, Node.js and Java.

Microsoft Azure Identity Libraries powered by Azure Active Directory

The Azure Active Directory Authentication Libraries (ADAL) gives you the ability to add support for Microsoft's cloud identity APIs to your application, including support for Office365 and Work Accounts.

These SDKs support native clients such as Windows, Windows Phone, iOS, OSX, Android, and Linux and server clients such as Windows Server, Node.js and Java.

These SDK gives your application the full functionality of Microsoft's identity platform, including industry standard protocol support for OAuth2, Web API integration with user level consent, and two factor authentication support. Best of all, it’s FOSS (Free and Open Source Software) so that you can participate in the development process as we build these libraries.

What is a Work Account?

A Work Account is an identity you use to get work done no matter if at your business or on a college campus. Anywhere you need to get access to your work life you'll use a Work Account. The Work Account can be tied to an Active Directory server running in your datacenter or live completely in the cloud like when you use Office365. A Work Account will be how your users know that they are accessing their important documents and data backed my Microsoft security.

We provide a full suite of sample applications and documentation on GitHub to help you get started with learning the Azure Identity system. This includes tutorials for native clients such as Windows, Windows Phone, iOS, OSX, Android, and Linux. We also provide full walkthroughs for authentication flows such as OAuth2, OpenID Connect, Graph API, and other awesome features.

Contributing

All code is licensed under the Apache 2.0 license and we triage actively on GitHub. We enthusiastically welcome contributions and feedback. You can clone the repo and start contributing now.

1611 questions
14
votes
5 answers

Invalid signature while validating Azure ad access token, but id token works

I am getting invalid signature while using jwt.io to validate my azure ad access token. My id token, however, validates just fine! I have seen and tried the solutions suggested in Invalid signature while validating Azure ad access…
Jeppe
  • 1,424
  • 2
  • 15
  • 36
14
votes
5 answers

AcquireTokenSilent always Failed to acquire token silently

Using ADAL I have two AuthenticationContext using a Token Cache persisted in SQL. Using AcquireTokenByAuthorizationCode it writes the Token in database, but when using AcquireTokenSilent I always get Failed to acquire token silently. Call method…
Ricardo Polo Jaramillo
  • 12,110
  • 13
  • 58
  • 83
13
votes
2 answers

Token cache serialization in MSAL.NET is not working

I am facing some issues when trying to serialize the tokencache, returned from authenticating with MSAL. I would appreciate any help, since i don't really understand what i am doing wrong. Here is our situation/problem: We are currently using ADAL…
Mira
  • 181
  • 1
  • 9
13
votes
6 answers

401- Unauthorized authentication using REST API Dynamics CRM with Azure AD

I'm trying to access a Dynamics CRM Online REST API with Azure AD oAuth 2 Authentication. In order to do so I followed these steps: - I've registered a web application and/or web api in Azure - Configured the permissions to Dynamics CRM to have…
André Cavaca
  • 510
  • 1
  • 5
  • 18
13
votes
1 answer

Microsoft.Owin.Security.OpenIdConnect with Azure Active Directory authentication ticket lifetime

I am building a multi tenant web app that connects Office 365 services using Microsoft.Owin.Security.OpenIdConnect, Version=3.0.0.0 and Azure Active Directory with Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.19.0.0 following this…
Benoit Patra
  • 4,355
  • 5
  • 30
  • 53
13
votes
1 answer

Group claims with Azure AD and OAuth2 implicit grant in ADAL JS

Background We are developing a multi-tenant SaaS product in Azure which has an AngularJS front-end and Web API back-end. We use Azure AD for authentication and have hooked it up with ADAL JS (using the OAuth2 implicit grant). Being a multi-tenant…
Richard Pickett
  • 482
  • 8
  • 17
12
votes
3 answers

Fetch access token from authorization header without bearer prefix

I'm using the Microsoft.AspNetCore.Authentication.JwtBearer and System.IdentityModel.Tokens.Jwt packages for my .NET Core project. There are some controller endpoints protected by the [Authorize] annotation that have to fetch the access token from…
Question3r
  • 2,166
  • 19
  • 100
  • 200
12
votes
2 answers

How to generate JWT Token with IdentityModel Extensions for .NET 5

I am using IdentityModel Extensions for .NET version 4 to generate JWT token with symmetric key and SHA256 as below and it works perfectly: var tokenDescriptor = new SecurityTokenDescriptor { Subject = new ClaimsIdentity(claims), …
cuongle
  • 74,024
  • 28
  • 151
  • 206
12
votes
1 answer

Azure Active Directory B2C deployment via resource manager (or code)

Our company is considering using AAD B2C as the backing store for our SaaS user accounts. Our plan is use Resource Manager templates to deploy the Azure infrastructure (web, storage, sql, etc) for each client. AAD B2C will be part of that if this…
Josh
  • 4,009
  • 2
  • 31
  • 46
11
votes
2 answers

MSAL/ADAL C++ equivalent to get access tokens

Is there a MSAL/ADAL equivalent for C++ ? I would like to natively support getting access tokens for Azure in C++ (rather than build a bridge of some kind by using python version.) Thank you
Rags
  • 139
  • 1
  • 4
11
votes
1 answer

AADSTS50020: We are unable to issue tokens from this api version for a Microsoft account

I'm writing a simple C# mobile application which I've registered at https://apps.dev.microsoft.com/ to access live.com/outlook.com mailboxes (not outlook 365 mbx). I'm using ADAL for authenticating using the client id and redirect URI from the…
whatever
  • 2,492
  • 6
  • 30
  • 42
11
votes
1 answer

Refreshing Sql Connection Azure AD access token inside long-lived Entity Framework Context

I'm trying to set up a few .NET applications to use certificate-based authentication to Azure Active Directory and then use Active Directory to authorize my access to a Sql Azure DB. The problem I'm running into is that some parts of the application…
Nick
  • 695
  • 8
  • 23
11
votes
3 answers

How to access Graph API from Web API in SPA application

I have an Angular application that talks to the WebAPI and the users are authenticated against Azure Active Directory I followed the sample here https://github.com/Azure-Samples/active-directory-angularjs-singlepageapp-dotnet-webapi and was able to…
11
votes
1 answer

How to correctly send a PATCH request

I need to call this REST endpoint PATCH https://graph.windows.net/contoso.onmicrosoft.com/users/username@contoso.onmicrosoft.com?api-version=1.5 HTTP/1.1 { "": } Please see documentation here:…
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
10
votes
5 answers

Error: AADSTS50058: A silent sign-in request was sent but no user is signed in - Angular ADAL authentication issue in mobile safari browser

We have a site developed using Angular 7 and it uses Adal-Angular4 library for Azure Active Directoty authentication. When the site is browsed in safari on iPhone, it runs into below error. Error: AADSTS50058: A silent sign-in request was sent but…
skATsof
  • 191
  • 1
  • 1
  • 10