我想知道ADAL.js是否适用于ADFS和本地AD。实际上,我需要获取ADFS的Id_Token并将其传递到SharePoint REST API的标头中。
在acticle ADAL.js之后,我使用Azure参数找到了它:
@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`.
实际上,我是在内部使用Active Directory和ADFS,作为开发人员,我也无权访问AD和ADFS,并且有一种方法只能使用用户电子邮件来获取ID_token(以免用户设置登录名和密码)
所以任何人都有一个样本可以做到这一点吗?
之所以看到Azure AD参数,是因为该项目适用于Azure AD。
本文向您展示了如何更改某些参数,使其可以在ADFS上使用。
如果查看文章左侧的树结构,则在Server 2019上具有ADFS的情况下,MSAL库也将起作用。
请注意,ADAL / MSAL仅用于Azure AD / Azure AD B2C / ADFS。
id_token由OpenID Connect规定,要获得它,您必须进行身份验证。
如果您想使用IDP,请查看identityserver4,但我不知道ADAL库是否可以解决该问题。
您为什么要使用ADAL?