Per [RFC4532](https://tools.ietf.org/html/rfc4532), this can be done via an extended request with OID `1.3.6.1.4.1.4203.1.11.3`. It seems this is already implemented in the (presumably no-longer-maintained) [samuel/go-ldap](https://github.com/samuel/go-ldap) library ([here](https://github.com/samuel/go-ldap/blob/09b1a56d27556db648269ff780db35705dd55ca4/ldap/client.go#L315-L335)).