Active Directory

Always_Learning

Registered User.
Local time
Today, 10:55
Joined
Oct 7, 2013
Messages
71
Hi There,

I have taken over the maintenance of an Access Application and the client wants to have single sign on.

At the moment the users logs into the Access system by giving a username and password. The client wants as little work as possible and I was wondering how access can get details of the windows logged in user and match them with the user table of the Access system.
The tables of the Access system are MS Sql Server.
Is there a simple way for me to achieve this.

Thanks for the help.

Best Regards,
 
Also you can use the native environ("Username") to retrieve the username.
Environ holds quite a few more easy to have things :)
 
The GetLoginName function uses an API call and is far more complex than the job needs to be.

Environ is a poor choice for securty because Environment variables can be very easily changed.

Better to get the actual value with this simple expression:

Code:
CreateObject("wscript.network").UserName
 
http://access.mvps.org/access/api/api0008.htm

Hi There,

Thank you for your help.

I am able to get the user name with the code in the link above but because there can be more people called 'david' in a company I need to be able to get the email address of the currently logged in user. This will help more to identify the user.
Is there a way to get their email address too.

Best Regards,
 
I believe usernames need to be unique within the domain as well?
 
The function is not an Active Directory lookup. It simply returns the name of the local logged in user. (Why not use the simple expression I posted instead?)

If multiple users have the same login name then they are not logging in from the domain as these names must be unique.

If they are domain logins the logged in user would still be returned in one of the ways already discussed then Active Directory queried via an LDAP query using that information to return any other information about the user.

Search this forum for my name and LDAP for more information about using LDAP queries. I have posted quite a bit about it with useful links too.
 

Users who are viewing this thread

Back
Top Bottom