RE: Sql To Active Directory Quickie

From: mkdesigns2004 (mkdesigns2004_at_discussions.microsoft.com)
Date: 01/13/05


Date: Thu, 13 Jan 2005 09:25:08 -0800

I have a similar question. I would like to use a stored procedure to get a
list of our groups and their members. I have been able to program the sp to
get the list of groups or get a list of users. However, i can not figure out
how to get a list of users and what groups they are a part of or get a list
of groups and who the members are. I was using the following code to pull the
list of groups:

SELECT * FROM OPENQUERY( ADSI,
    'SELECT name
     FROM ''LDAP://CN=Builtin,DC=domain name here, DC=com''
     WHERE objectClass = ''group'' ')

I tried adding member to the select statement however i get the following
error: Could not convert the data value due to reasons other than sign
mismatch or overflow.

Is there a way to pull a list of groups and their memebers?

Thanks!
Meghann

"Jm" wrote:

> Hi all
>
> Im not sure if this is possible, but im sure ill get the answer here. In SQL
> Server is it possible to create a stored procedure that will take a username
> supplied by you and check the active directory account for that user and
> find what active directory groups the user is a member of, and in some way
> report back ? Any help is greatly appreciated
>
> Thanks
>
>
>



Relevant Pages

  • Re: Tracking users when browser is closing
    ... solution was to use an IFrame with an ASP page that I called ... This is a self refreshing page that refreshes every 30 ... The page executes a stored procedure on SQL Server that modifies and ... plugs in the members id and date visited (or updates the record if the ...
    (microsoft.public.inetserver.asp.general)
  • Re: datareader doing updates
    ... On a test we granted Alpha exec rights to an update Stored Procedure. ... members of Alpha are now able to run the Stored Procedure and do updates ...
    (microsoft.public.sqlserver.security)
  • Re: Oracle RAC Stored Procedure scalability
    ... Just wonder how the oracle rac facilitate the stored procedure ... procedure call on different members of cluster. ...
    (comp.databases.oracle.server)
  • How to view #temp tables in vs.net (stored procedures)
    ... When you step into a stored procedure using vs.net, you get all the debug ... members WHERE...). ... Is it possible to view the temp tables? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: AutoComplete Outlook 2003 Distribution Lists
    ... Members of an AD/Exchange based distribution list are not cached in the ... Outlook doesn't pull down the member ... When sending a message to a DL, it is the Exchange server that ... would pull down the list names each time in case of change. ...
    (microsoft.public.outlook)