getAuthTokensForUser

Get active authentication tokens for user

Returns the list of authorization tokens for a user. Only metadata for the tokens is returned; the token secrets themselves are not available. Only users with 'Manage Security' permission can use this function for users other than themselves.

Format

udclient [global-args...] [global-flags...]
  getAuthTokensForUser [parameters]

Parameters

Table 1. Parameters
Parameter Type Required Description
user string false The user for which tokens are returned. Required if querying tokens for a user other than the one making the request.

Example command to get auth tokens of a specific user

udclient -username jsmith -password passwd 
  -weburl https://deployserver.example.com:8443
  getAuthTokensForUser
  -user jsmith

Example response for a specific user

{
  "tokens": [{
    "id": "194dba1b-ff4a-473e-19a8-c96d1246b690",
    "expiration": 1740208500000,
    "host": "",
    "description": "dummyuser",
    "createdDate": 1738851598324,
    "verbToUrls": [{
      "verb": "ALL",
      "url": "*"
    }]
  }],
  "userId": "a51fe9df-9625-48c2-bd01-4b50acf4c72b",
  "userName": "jsmith"
}

Related REST command: Get active authentication tokens for user.