> For the complete documentation index, see [llms.txt](https://docs.defguard.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.defguard.net/2.1/for-developers/rest-api/core/ldap/preview-the-changes-a-full-ldap-sync-would-make.md).

# Preview the changes a full LDAP sync would make

Uses the settings from the request body, which do not have to be saved yet. Read-only: nothing is imported, removed or persisted.

```json
{"openapi":"3.1.0","info":{"title":"defguard Core API","version":"2.1.0"},"tags":[{"name":"LDAP","description":"LDAP connection tests and sync dry runs."}],"security":[{"cookie":[]},{"api_token":[]}],"components":{"securitySchemes":{"cookie":{"type":"apiKey","in":"cookie","name":"defguard_session"},"api_token":{"type":"http","scheme":"bearer"}},"schemas":{"ApiErrorResponse":{"type":"object","description":"Body returned with error responses.","required":["msg"],"properties":{"code":{"type":["string","null"],"description":"Machine-readable error code, returned for selected errors."},"msg":{"type":"string","description":"Human-readable error message."}}}}},"paths":{"/api/v1/ldap/dry_run":{"post":{"tags":["LDAP"],"summary":"Preview the changes a full LDAP sync would make","description":"Uses the settings from the request body, which do not have to be saved yet. Read-only:\nnothing is imported, removed or persisted.","operationId":"ldap_dry_run","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":true},"responses":{"200":{"description":"Dry run result.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Unable to connect to LDAP or to perform the dry run."},"401":{"description":"Session is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Requires admin privileges and an active enterprise license.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Unable to perform LDAP dry run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}}}
```
