ADSystemInfo Get Username Property Error After Switch To Windows 11

arpd123

New Member
Joined
May 14, 2018
Messages
25
Office Version
  1. 365
Platform
  1. Windows
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.
VBA Code:
Set objInfo = CreateObject("ADSystemInfo")
strLDAP = objInfo.UserName
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

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?
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
I am on Windows 11 Enterprise and while I am unable to replicate this issue on my machine, I have a user (that recently got a new laptop) that has this issue.
 
Upvote 0
I am experiencing the exact same issue with Windows 11 devices not returning any information when using the Set objInfo = CreateObject("ADSystemInfo") did you find a solution to the problem?
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,194
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top