Retrieving AD Users

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsRetrieving AD Users
(Created page with "### Tutorial DreamFactory 2.0 Active Directory service allows you to retrieve your Active Directory Users using the 'user' resource. This tutorial focuses on retrieving Acti...")
 
(Example - Getting a list of users by LDAP query filter.)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
### Tutorial
+
=== Tutorial ===
  
DreamFactory 2.0 Active Directory service allows you to retrieve your Active Directory Users using the 'user' resource.
+
DreamFactory's Active Directory service allows you to retrieve your Active Directory Users using the 'user' resource.
  
 
This tutorial focuses on retrieving Active Directory Users using an existing DreamFactory Active Directory service. To learn  
 
This tutorial focuses on retrieving Active Directory Users using an existing DreamFactory Active Directory service. To learn  
how to setup an Active Directory service see [Using Active Directory](DreamFactory/Tutorials/Using_Active_Directory).
+
how to set up an Active Directory service see [[DreamFactory/Tutorials/Using_Active_Directory|Using Active Directory]].
  
### API Endpoints
+
=== API Endpoints ===
  
 
* To get a list of all Active Directory Users and their details.
 
* To get a list of all Active Directory Users and their details.
Line 14: Line 14:
 
<pre>GET http://{url}/api/v2/{ad_service}/user/{username}</pre>
 
<pre>GET http://{url}/api/v2/{ad_service}/user/{username}</pre>
  
### Example - Getting list of all Active Directory Users with all fields.
+
=== Example - Get list of all Active Directory Users with all fields ===
 
* Service name: ad
 
* Service name: ad
 
* Request URL:
 
* Request URL:
 
<pre>GET http://foo.com/api/v2/ad/user</pre>
 
<pre>GET http://foo.com/api/v2/ad/user</pre>
  
### Example - Getting list of all Active Directory Users with a specific fields.
+
=== Example - Get list of all Active Directory Users with specific fields ===
 
* Service name: ad
 
* Service name: ad
 
* Fields to retrieve: sn,givenname
 
* Fields to retrieve: sn,givenname
Line 25: Line 25:
 
<pre>GET http://foo.com/api/v2/ad/user?fields=sn,givenname</pre>
 
<pre>GET http://foo.com/api/v2/ad/user?fields=sn,givenname</pre>
  
### Example - Getting a specific User information.
+
=== Example - Get specific User information ===
 
* Service name: ad
 
* Service name: ad
 
* Username to retrieve: jdoe
 
* Username to retrieve: jdoe
 
* Request URL:
 
* Request URL:
 
<pre>GET http://foo.com/api/v2/ad/user/jdoe</pre>
 
<pre>GET http://foo.com/api/v2/ad/user/jdoe</pre>
 +
 +
=== Example - Get a list of users by LDAP query filter ===
 +
* Service name: ad
 +
* LDAP Query: (sn=Doe) [List users where the sn (last name) is Doe]
 +
* Request URL:
 +
<pre>GET http://foo.com/api/v2/ad/user?filter=(sn=Doe)</pre>

Latest revision as of 16:33, 15 July 2016

Tutorial

DreamFactory's Active Directory service allows you to retrieve your Active Directory Users using the 'user' resource.

This tutorial focuses on retrieving Active Directory Users using an existing DreamFactory Active Directory service. To learn how to set up an Active Directory service see Using Active Directory.

API Endpoints

  • To get a list of all Active Directory Users and their details.
GET http://{url}/api/v2/{ad_service}/user
  • To get details about a specific User.
GET http://{url}/api/v2/{ad_service}/user/{username}

Example - Get list of all Active Directory Users with all fields

  • Service name: ad
  • Request URL:
GET http://foo.com/api/v2/ad/user

Example - Get list of all Active Directory Users with specific fields

  • Service name: ad
  • Fields to retrieve: sn,givenname
  • Request URL:
GET http://foo.com/api/v2/ad/user?fields=sn,givenname

Example - Get specific User information

  • Service name: ad
  • Username to retrieve: jdoe
  • Request URL:
GET http://foo.com/api/v2/ad/user/jdoe

Example - Get a list of users by LDAP query filter

  • Service name: ad
  • LDAP Query: (sn=Doe) [List users where the sn (last name) is Doe]
  • Request URL:
GET http://foo.com/api/v2/ad/user?filter=(sn=Doe)