0
votes

I wonder if ADAL.js works on ADFS and AD on-premise or not. Actually, I need to get the Id_Token of ADFS and pass it in the headers of SharePoint REST API.

following the acticle ADAL.js i found it using Azure parameters:

 @property {string} tenant - Your target tenant.
     *  @property {string} clientId - Client ID assigned to your app by Azure Active Directory.
     *  @property {string} redirectUri - Endpoint at which you expect to receive tokens.Defaults to `window.location.href`.
     *  @property {string} instance - Azure Active Directory Instance.Defaults to `https://login.microsoftonline.com/`.
     *  @property {Array} endpoints - Collection of {Endpoint-ResourceId} used for automatically attaching tokens in webApi calls.
     *  @property {Boolean} popUp - Set this to true to enable login in a popup winodow instead of a full redirect.Defaults to `false`.

In fact am using Active directory and ADFS on-premise, As a developer, I don't have access to AD and ADFS neither, and is there a way to get the ID_token using user email only (in order to not oblige the user to set login and password)

So any one have a sample a way to do this ?

1

1 Answers

1
votes

The reason that you see the Azure AD parameters is because the project is for Azure AD.

The article shows you how to change some of the parameters so that it works on ADFS.

If you look at the tree structure on the left of the article, you'll see that the MSAL libraries also work if you have ADFS on Server 2019.

Note that ADAL / MSAL are only for Azure AD / Azure AD B2C / ADFS use.

The id_token is prescribed by OpenID Connect and to get it you have to authenticate.

If you want an IDP to use, look at identityserver4 but I don't know if the ADAL library with work against that.

Why do you want to use ADAL?