Get a Jumpstart with our Sample Apps
Results 1 to 5 of 5

Thread: How to get Active Directory user details

  1. #1
    Member
    Real Name
    Lee Millard
    Join Date
    Jun 2017
    Location
    United Kingdom
    Posts
    15

    Default How to get Active Directory user details

    Hi Guys,

    So I have played with Context.Security.CurrentUser for get the currently logged in user, and Context.Security.GetEmail() to get the email address.

    What function/method can I use to get the users Ext number or telephone ??

    Or any other user detail for that matter.

    My aim is to create a grid filled with user names with internal Ext/Telephone numbers.

    An internal phone list from the AD within effect.

    Thanks

    Lee

  2. #2
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,216

    Default Re: How to get Active Directory user details

    Quote Originally Posted by leemillard View Post
    Hi Guys,

    So I have played with Context.Security.CurrentUser for get the currently logged in user, and Context.Security.GetEmail() to get the email address.

    What function/method can I use to get the users Ext number or telephone ??

    Or any other user detail for that matter.

    My aim is to create a grid filled with user names with internal Ext/Telephone numbers.

    An internal phone list from the AD within effect.

    Thanks

    Lee
    We will be adding a new function to Xbasic to get this information from the AD. Should be in the pre-release build soon.

  3. #3
    Member
    Real Name
    Jonathan Freestone
    Join Date
    Apr 2017
    Location
    West Sussex UK
    Posts
    14

    Default Re: How to get Active Directory user details

    You could use a view via a linked server using ADSI. https://www.mssqltips.com/sqlservert...om-sql-server/

    SELECT *
    FROM
    OPENQUERY(ADSI,
    '
    SELECT displayName,homeMDB,mail, sAMAccountName, ADsPath, telephoneNumber
    FROM ''LDAP://DC=your,DC=domain''
    WHERE
    objectClass = ''User''
    AND
    objectCategory =''person''

    ')

  4. #4
    Alpha Software Employee Beta Spark's Avatar
    Real Name
    Sarah Mitchell
    Join Date
    Jul 2015
    Posts
    378

    Default Re: How to get Active Directory user details

    Quote Originally Posted by Jonathan Freestone View Post
    You could use a view via a linked server using ADSI. https://www.mssqltips.com/sqlservert...om-sql-server/
    Or the a5ws_getUserValuesActiveDirectory Function https://www.alphasoftware.com/docume...ory%20function
    Sarah Mitchell

    Looking for answers? Try our documentation.
    If you can't find something, let us know!

  5. #5
    Member
    Real Name
    Lee Millard
    Join Date
    Jun 2017
    Location
    United Kingdom
    Posts
    15

    Default Re: How to get Active Directory user details

    This is far far too slow (a5ws_getUserValuesActiveDirectory)

Similar Threads

  1. Lockout user while connected to Active Directory
    By Skeith in forum Mobile & Browser Applications
    Replies: 9
    Last Post: 10-09-2014, 03:29 PM
  2. Active Directory Integration
    By iRadiate in forum General Questions
    Replies: 3
    Last Post: 09-18-2014, 10:54 AM
  3. Alpha Five with Active Directory
    By daniejam in forum General Questions
    Replies: 8
    Last Post: 03-06-2012, 08:24 AM
  4. Active Directory Integration?
    By StevenMcLean in forum Application Server Version 10 - Web/Browser Applications
    Replies: 21
    Last Post: 04-15-2011, 03:10 PM
  5. Alpha Five & Active Directory
    By kimor in forum Alpha Five Version 8
    Replies: 1
    Last Post: 05-17-2008, 02:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •