Retrieving AD Users

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsRetrieving AD Users

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 - Getting list of all Active Directory Users with a specific fields.

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

Example - Getting a specific User information.

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

Example - Getting 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)