I'm Working on an Intranet application that is build in PHP on IIS. I want to authenticate against an AD by passing the username automatically from the browser to the IIS using windows authentication. Is there anyway to do that?
Yes, IIS supports integrated Windows authentication. Access the 'Authentication' option for your website...

...and change the 'Windows Authentication' item to 'enabled' (and perhaps 'Anonymous Authentication' to 'disabled' if you want to force users to authenticate)...

More details are available on Technet.
In PHP the username should be populated in the $_SERVER superglobal. I think as AUTH_USER, but I can't confirm that right now. Use var_dump($_SERVER); to find the correct key.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With