Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADFS 2.0 - How can I Debug "401 - Unauthorized"

I setup a test Server 2008 box with Active Directory and ADFS 2.0. I have an ASP.NET app which uses WIF to federate identity. ADFS is configured to use Active Directory for identity info. I used WIF to configure the client app to use the ADFS endpoint.

When I attempt to load the ASP.NET app as a user from the browser I am redirected to the ADFS endpoint and am prompted for credentials. I have attempted to login with several users accounts, even resetting passwords but the credentials never seem to be correct and a 401 Unauthorized is returned. I can login to other systems successfully with the same credentials.

I have enabled debug trace in verbose mode and enabled auditing in verbose mode but I can't find any errors or info to help me figure out the issue.

How can I get more info to narrow down the problem?

UPDATE:

I found that this issue is caused by my testing environment. My dev machine is on our corporate domain (acme.com). I created two 2008R2 VMs for a test Domain Controller (notacme.com) and Web Server.

If I attempt to access the website from a computer on the acme.com domain the error described above occurs. If I attempt to access the website from a computer on the notacme.com domain it works.

What can I do to access the website from a computer on the acme.com domain?

like image 837
chief7 Avatar asked Jul 14 '11 20:07

chief7


People also ask

How do I authenticate ADFS?

The authentication process generally follows these four steps: The user navigates to a URL provided by the ADFS service. The ADFS service then authenticates the user via the organization's AD service. Upon authenticating, the ADFS service then provides the user with an authentication claim.


1 Answers

Apparently this was caused by the Extended Protection feature built into ADFS. In trying to troubleshoot this issue I had Fiddler running to track the requests/responses but at one point I swear I turned it off to test as well but it still didn't work. Apparently I didn't fully remove the Fiddler proxy because after a IE reboot and with Fiddler not running it worked in IE but found it still didn't work in Firefox or Chrome. This led me to a TechNet article which described the behavior I've been seeing in conjuction with using Fiddler.

http://social.technet.microsoft.com/wiki/contents/articles/ad-fs-2-0-continuously-prompted-for-credentials-while-using-fiddler-web-debugger.aspx

like image 116
chief7 Avatar answered Sep 24 '22 01:09

chief7