keith5885 — 2012-05-31T15:19:47-04:00 — #1
I've been looking for a easy way to get the users windows ID on my intranet portal PHP application. I found a few things but nothing that promising.
I have a MSSQL database and PHP on a IIS server. AD windows environment.
Any ideas for me to look into? Anyone done this?
Thanks in advance!
keith5885 — 2012-06-01T15:03:56-04:00 — #2
Anyone have any direction?
I have googled and found a few things but nothing great. Forums search doesn't turn up much either.
serverstorm — 2012-06-04T16:55:15-04:00 — #3
A long shot ... Active Directory is essentially ldap that is wrapped. You may look into reading Active Directory via an ldap tool. Then you may be able to use one of the PHP ldap classes to tap into the Active Directory ldap. I can tell you that expect this to be very hairy experience.
doug_g — 2012-06-05T14:08:23-04:00 — #4
Or if IIS is in windows authentication mode I think there is a server variable with the username that you can retrieve with asp, and probably is available to php too.
jake_arkinstall — 2012-06-05T14:11:56-04:00 — #5
If it's on the intranet, and you have access to the startup scripts of computers on the network, you could create a startup script to log them into the intranet upon login.
Though I'd like to point out that instant-login can have some nasty security consequences - it might just be easier to make them log in.
joelcitizen — 2013-01-03T11:51:54-05:00 — #6
This entry from stackoverflow may help http://stackoverflow.com/questions/168610/can-you-get-a-windows-ad-username-in-php. the integrated security model that Windows provides allows for the credential to be cached and passed on to the server.
serverstorm — 2013-01-03T12:01:05-05:00 — #7
As the original OP of this thread last posted in June, it is safe for this thread to be closed.