Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] No client secret on web app - No specific error message #1576

Closed
anasimao opened this issue Jan 15, 2020 · 5 comments
Closed

[Bug] No client secret on web app - No specific error message #1576

anasimao opened this issue Jan 15, 2020 · 5 comments
Labels
Milestone

Comments

@anasimao
Copy link

Facing an error where the no client secret was being used in a web app showed an error message that also mentioned a problem with Reply URL, only mentioning the client secret on the third line

A more precise error message should indicate that the error was with the client secret of the application.

REPRO:
On this specific case used the sample active-directory-aspnetcore-webapp-openidconnect-v2 and wanted to call an API (MS GRaph) to and did not change the client secret provided in the sample, so the value looked like this:
"ClientSecret": "[Copy the client secret added to the app from the Azure portal]"
After running the project, the page loads with the following error message:
MsalServiceException: The wrong application (public or confidential) is being used with this authentication flow. Potential issue: the redirect URI is valid, but it has been configured for the wrong app type. Check the configuration of the app being used in the app registration portal. See https://aka.ms/msal-net-invalid-client for details. Original exception: AADSTS7000215: Invalid client secret is provided.

@bgavrilMS
Copy link
Member

I have already fixed that error message, which I agree is confusing. The "original exception" the useful bit. MSAL 4.8 will have the fix.

#1556

@bgavrilMS bgavrilMS reopened this Jan 15, 2020
@bgavrilMS bgavrilMS added this to the 4.8 milestone Jan 15, 2020
@jmprieur
Copy link
Contributor

Actually in that case (wrong client secret), the message won't work, or we need to add more to the aka.ms link.
We have more context here that we are in a confidential client app.

@trwalke trwalke changed the title [Feature Request] No client secret on web app - No specific error message [Bug] No client secret on web app - No specific error message Jan 20, 2020
@jennyf19
Copy link
Collaborator

fixed in 4.8.1

@jmprieur
Copy link
Contributor

@anasimao : are you using the latest version of MSAL.NET? I see this error message all the time?
Is it an option for you to use Microsoft.Identity.Web ?

@bgavrilMS
Copy link
Member

Please don't revive old issues without context. There is a form to fill for logging bugs, which should give us more insights, so please open a new issue and reference the old one if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants