I have a macro that gets the Active Directory username of the current user, in order to map their username to a full name with an LDAP query.
It has worked to date in Windows 10 and Windows 7 before that. However, some users have recently switched to Windows 11 at my company and for them the above code is now giving the error
Before raising the matter with IT, I would like to know what the cause for the issue might be. Does anyone have any idea, or have you run into something similar?
VBA Code:
Set objInfo = CreateObject("ADSystemInfo")
strLDAP = objInfo.UserName
Run-time error '-2147023564 (80070534)'
Automation error
No mapping between account names and security IDs was done.
Before raising the matter with IT, I would like to know what the cause for the issue might be. Does anyone have any idea, or have you run into something similar?