Discover domain controllers for a domain name
POST/config/ldaps/discover
Looks up the DNS SRV records _ldap._tcp.dc._msdcs.<domain> and returns the domain controllers sorted by priority, then weight, then name.
search_base is derived from the domain name (example.com becomes dc=example,dc=com). ssl is true when the port is 636. A lookup failure still returns HTTP 200, with an error object instead of an array. Accepts JSON or application/x-www-form-urlencoded bodies. Required role: admin or superadmin. Any lookup problem, including a missing domain, returns HTTP 200 with {error: {code, msg}}. code is the DNS error name: ENOTFOUND (msg Unable to connect to the host.), otherwise the DNS error code such as ENODATA or EBADNAME with msg Unable to discover details about your domain. (<code>); DiscoverFail is the fallback.
Request
Responses
- 200
- 401
- 403
Array of discovered domain controllers, or an error object when the lookup failed.
No token, or the token is invalid or expired. The body is {message}: No auth token provided when no token is sent, otherwise the token check's message (jwt expired, jwt malformed, invalid signature, invalid token, jwt signature is required). Send Authorization: Bearer <token> exactly: the server drops the first seven characters of the header and reads the rest as the token, so a different scheme or an extra space fails. If Authorization is absent, the server reads a token field in the body, then a token query parameter, then x-access-token. Routes that validate query fields reject ?token= with 400 InvalidQuery.
The token's role is not allowed for this operation, or the token's scopes exclude the route
(Scope not allowed by token).