Seems like I had an issue with ListUsers() a year ago or so. In our environment, we have to use the SDE user connection in order to get ListUsers() to return a list. We have two sets of connection files, one for 'SUperUser' the other for 'SDE'. Notice in line 2 I log on as 'SuperUser' and it fails, while on line 18 as SDE user all is good....
import arcpy
arcpy.env.workspace = r'I:\GIS\ArcSDE\SuperUser\addressing\SLCOad@addressingTEST.sde'
ws = arcpy.env.workspace
arcpy.ListUsers(ws)
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcPy\arcpy\__init__.py", line 1066, in ListUsers
return utils.listofnamedtuples(gp.listUsers(sde_workspace), 'user')
File "C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcPy\arcpy\geoprocessing\_base.py", line 510, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: Connection information provided was for a non-administrative user
ws = r'I:\GIS\ArcSDE\SdeUser\sde@addressingTEST.sde'
arcpy.ListUsers(ws)
[user(ClientName=u'AD-TCURTIS-
That should just about do it....