Sorry, i had been out for few days and could not respond. Anyways, the issue is still there and appreciate any help.
Joe, no, this is not at Windows IWA auth scheme. I was able to narrow the issue by creating a small single page aspx webform. The only thing the webform does is to display these 2 values:
Current User: <%= HttpContext.Current.User.Identity.Name + "<br />"%>
Windows Identity: <%=System.Security.Principal.WindowsIdentity.GetCurrent().Name + "<br />"%>
I ran the above test page url and here is what I received as output when ran from the IIS server with CA webagent installed, and logged with myaccountid SSO credentials and the below IIS settings on the web server:
IIS Windows Authentication settings enabled.
a. IIS -> select Application -> Windows Authentication -> Enabled
b. IIS -> Select Application -> Advanced Setting -> ApplicationPool -> Set as "TestApp"
c. IIS -> Applicationpools -> Select 'TestApp' -> Advanced Setting -> Identity -> Set as "Domain\service_account"
d. Anonymous authentication is disabled.
Actual Result:
Current User: Domain\myaccountid
Windows Identity: Domain\myaccountid
Expected result:
Current User: Domain\myaccountid
Windows Identity: Domain\service_account
I was expecting the Windows Identity to show the domain AD service account setup in the Application pool for this testapp. Why is Windows Identity showing as Domain\myaccountid instead of Domain\service_account ?
I get the same result even if I turn off the webagent. But if I uninstall the webagent, then I get the 'expected result' mentioned above.
Appreciate any pointers.