I'm having the same issue. I need to query users from our internal domain and users from our external domain. The OUs and Groups that I use for my application are in the external domain. The SQL Server is in the internal domain. I can query the internal domain just fine but get the following error when I try the external domain from SQL Server:
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "ADSDSOObject" for linked server "(null)".
I'm using OPENROWSET as follows:
select * FROM OPENROWSET('ADSDSOObject',
'User ID=domain\User;Password=XXX;adsdatasource;',
'SELECT cn, mail, co, distinguishedName, displayName
FROM ''LDAP://DC=XX,DC=XX'' where objectClass = ''User'' ')
This works on our internal domain. Any pointers would be greatly appreciated.
Thanks, Mike