ADsOpenObject() is failed with error code "8007203a" (The server is not operational).
When I call ADsOpenObject(lpszPathName, lpszUserName, lpszPassword, dwReserved, riid, **ppObject), it is failed with "8007203a", whereas the lpszPathName is like "LDAP://192.168.0.1/CN=username,CN=users,DC=AD_domain,DC=com"
If I replace with Domain controller's hostname instead of IP address like "LDAP://server01/CN=username,CN=users,DC=AD_domain,DC=com", then it succeeds.
As the target machine is hosted in Azure, we can't provide the domain controller hostname.
And my questions are,
Why ADsOpenObject is failing when we provide IP address?
Is there any alternative way to bind the objects using Domain Controller's IP address?