Retrieving AD Users
From DreamFactory
(→Example - Getting list of all Active Directory Users with all fields.) |
(→Example - Getting a list of users by LDAP query filter.) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 19: | Line 19: | ||
<pre>GET http://foo.com/api/v2/ad/user</pre> | <pre>GET http://foo.com/api/v2/ad/user</pre> | ||
− | === Example - | + | === 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 - | + | === Example - Get specific User information === |
* Service name: ad | * Service name: ad | ||
* Username to retrieve: jdoe | * Username to retrieve: jdoe | ||
Line 31: | Line 31: | ||
<pre>GET http://foo.com/api/v2/ad/user/jdoe</pre> | <pre>GET http://foo.com/api/v2/ad/user/jdoe</pre> | ||
− | === Example - | + | === Example - Get a list of users by LDAP query filter === |
* Service name: ad | * Service name: ad | ||
* LDAP Query: (sn=Doe) [List users where the sn (last name) is Doe] | * LDAP Query: (sn=Doe) [List users where the sn (last name) is Doe] | ||
* Request URL: | * Request URL: | ||
<pre>GET http://foo.com/api/v2/ad/user?filter=(sn=Doe)</pre> | <pre>GET http://foo.com/api/v2/ad/user?filter=(sn=Doe)</pre> |
Latest revision as of 16:33, 15 July 2016
Contents
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)