简体   繁体   English

使用Azure AD登录我的Node.js应用程序后出现“隐藏”“客户端不存在”错误

[英]Cryptic “client does not exist” error after signing into my Node.js app with Azure AD

I am attempting to use the passport-azure-ad library to authenticate users for my Node.js web application. 我正在尝试使用passport-azure-ad库来验证我的Node.js Web应用程序的用户。

Accessing the sign in route I have configured in the app takes me to a Microsoft Azure sign in page (which is the expected behavior). 访问我在应用程序中配置的路径中的登录将我带到Microsoft Azure登录页面(这是预期的行为)。 However, when I sign in, I am taken to an error page ( https://login.live.com/err.srf?lc=1033#error=unauthorized_client&error_description=The+client+does+not+exist.+If+you+are+the+application+developer%2c+configure+a+new+application+through+the+application+management+site+at+https://apps.dev.microsoft.com/.&state=H08LUScEDdzg92Cq8gujjtT5LPKJ4sNJ ) that says "Client does not exist." 但是,当我登录时,我将进入错误页面( https://login.live.com/err.srf?lc=1033#error=unauthorized_client&error_description=The+client+does+not+exist.+If+你+ + +应用程序+开发人员%2c +配置+ a +新建+应用程序+通过+ +应用程序+管理+网站+ + https://apps.dev.microsoft.com/.&state=H08LUScEDdzg92Cq8gujjtT5LPKJ4sNJ )说“客户不存在”。 However, I have supplied the client ID and the client secret matching the application ID and application secret generated by the Microsoft Azure Active Directory app registration for my app, so the app clearly does exist. 但是,我提供了客户端ID和客户端密码,该密码与我的应用程序的Microsoft Azure Active Directory应用程序注册生成的应用程序ID和应用程序密钥相匹配,因此应用程序显然确实存在。 Also, the apps.dev.microsoft.com link is broken. 此外,apps.dev.microsoft.com链接已损坏。

How exactly can this problem be fixed? 这个问题究竟如何解决?

Registering an app at the Azure Portal under App Registrations will create a standard Azure AD app. App Registrations的Azure门户中注册应用App Registrations将创建标准的Azure AD应用程序。 This app can sign in Azure AD users in your tenant, and in any Azure AD tenant if configured to be multi-tenant. 如果配置为多租户,此应用程序可以在您的租户和任何Azure AD租户中登录Azure AD用户。

The error you have above is for the Microsoft Account STS. 您上面的错误是Microsoft帐户STS。 These are outlook.com , hotmail.com , live.com , etc accounts. 这些是outlook.comhotmail.comlive.com等帐户。 Since your app is not registered in this system, the service doesn't recognize your app. 由于您的应用未在此系统中注册,因此该服务无法识别您的应用。 If you would like to support these as well as Azure AD sign in, you need to register a converged app at the App Registration Portal . 如果您希望支持这些以及Azure AD登录,则需要在App Registration Portal注册融合应用程序

Use the app configs from that site instead of the ones you got from the Azure Portal and this should resolve the error you're getting. 使用该站点的应用程序配置而不是您从Azure门户获得的应用程序配置,这应该可以解决您收到的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM