Azure-Samples/active-directory-dotnet-webapp-openidconnect

Doesn't seem to work?

Closed this issue · 3 comments

Hi,

I cloned the code, added in my variables to web.config and ran the app. When I click on Sign In it redirects me to Azure AD, I entered the credentials, it redirected me back and I got a 401 unauthorised error and I have no cookie.

Any idea what I could have done wrong?

Also, if I put [Authorize] on the controller it doesn't redirect me to Azure AD at all, it just gives me a 401.

While I have you, would it be correct to say that this is a direct replacement for WS-FAM and SAM?

Thanks

Hey Rob. My initial guess would just be that one of your web.config values doesn't quite match what's in the portal, but I can't be sure. I would start by triple checking your configuration in the Azure portal.

Would you mind sharing your Web.config & Startup.Auth.cs? Feel free to email me if you would prefer.

Oh, and to your last question... In short, yes.

Thanks for getting back to me. Been a bit busy this week, but hoping to get back to this over the next few days. Will post back with the details.