Skip to content

Submit a query for AD Group

Request

OAuth 2.0 scope:
  • okta.directories.groups.read

Submits a query search on the on-premises agent to asynchronously fetch specific Active Directory (AD) attributes for a group. Returns a resultId that is used to poll for the results.

Path
appInstanceIdstringrequired

ID of the AD instance in Okta

Example:00a1xucgTZFrziXg10g4
groupIdstringrequired

ID of the Okta group

Example:00g1xucgTZFrziXg10g4
Bodyapplication/jsonrequired
attributesArray of stringsrequired

An array of LDAP group attribute names to retrieve. Restricted attributes: member, memberOf, *

Example:
[ "distinguishedName", "description", "cn", "whenCreated" ]
curl -i -X POST \
  https://subdomain.okta.com/api/v1/directories/00a1xucgTZFrziXg10g4/groups/00g1xucgTZFrziXg10g4/query \
  -H 'Content-Type: application/json' \
  -d '{
    "attributes": [
      "distinguishedName",
      "description",
      "cn",
      "whenCreated"
    ]
  }'

Responses

Accepted. Query initiated.

Bodyapplication/json
resultIdstring

Identifier used to poll for the query result

Example:"rdj4edr7pSDGv8QF10g4"
Response
{ "resultId": "rdj4edr7pSDGv8QF10g4" }