简体   繁体   中英

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.

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). 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." 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. Also, the apps.dev.microsoft.com link is broken.

How exactly can this problem be fixed?

Registering an app at the Azure Portal under App Registrations will create a standard Azure AD app. This app can sign in Azure AD users in your tenant, and in any Azure AD tenant if configured to be multi-tenant.

The error you have above is for the Microsoft Account STS. These are outlook.com , hotmail.com , live.com , etc accounts. 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 .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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