|
In order to use active directory from our adaptor program you can link Active directory to SQL server using the following command:
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5', 'ADSDSOObject', 'adsdatasource'
Following article explains how to use AD as a linked server in SQL, then use a view to query AD information:
http://articles.techrepublic.com.com/5100-6345_11-5259887-2.html
Then you need to create a view for this active directory. You can create a view in SQL server like:
SELECT title as JobTitle, displayName as Name,manager,department as DeptName,
mail as Email, telephoneNumber as Telephone,info as Category,info as Picture,
displayName as ORG_ID, manager as MGR_ID, 0 as 'Secretary',
(CASE WHEN manager IS NULL THEN 0 ELSE 1 END) AS 'HasParent'
FROM OpenQuery(ADSI, 'SELECT title,manager,mail, info,department, displayName, sAMAccountName, givenName, telephoneNumber, facsimileTelephoneNumber, sn FROM ''LDAP://DEV'' where objectClass = ''User''')
Now from the adaptor application you can connect to this database using the above view.
Followings are two samples of the SQL Connection string that can be used by our adaptor.
Example 1:
<add key="ConnectionString" value="Server=WSS2DEV;Database=SharedServices1_DB;Integrated Security=SSPI;"/>
Example 2:
<add key="ConnectionString" value="Data Source=YourSharePointSQLServer;Initial Catalog=YourSharedServicesdatabaseName;Integrated Security=SSPI;"/>
Top of Page 
|