000024030 - error 'AttributeError: getAssignedUser' when using Jython to list users assigned to tokens

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000024030
Applies ToRSA Authentication Manager 7.0
Microsoft Windows 2003 Server SP1
Red Hat Linux Advanced Server 4
Trying to list users that are assigned to tokens using the following:

cmd = SearchTokensCommand()

cmd.limit = 10000

ctx.execute(cmd)

tokens = cmd.getListSecurIDTokens()

for i in range(len(tokens)):

t = tokens[i]

print "%d) %s %s" % (i, t.getSerialNumber(), t.getAssignedUser())

Issueerror "AttributeError: getAssignedUser" when using Jython to list users assigned to tokens
Cause

SearchTokensCommand() defaults to searching ONLY unassiged tokens.  To list assigned you need to specify that.

ResolutionChange the script as follows:

true = 1

cmd = SearchTokensCommand()

cmd.limit = 10000

cmd.assigned = true

ctx.execute(cmd)

tokens = cmd.getListSecurIDTokens()

for i in range(len(tokens)):

t = tokens[i]

print "%d) %s %s" % (i, t.getSerialNumber(), t.getAssignedUser())

Legacy Article IDa35286

Attachments

    Outcomes