It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda CloudGen Access

You are currently viewing the legacy Barracuda Campus portal

Due to ongoing compatibility requirements during the migration, some users are still being redirected here. All content is being transitioned to the new Campus Training Portal and Campus Documentation Portal, and this legacy portal will be fully retired once the migration is complete.

Please visit https://campus.barracuda.com for more information.

Find the Last Time a Particular User Accessed a Specific / Any App

  • Last updated on

Back to CloudGen Access CLI Client Usage Examples


1. Find the UserID:

MY_USER_ID=$(access-cli users list -q stran@thisdomain.com -o json | jq -r '.[0].id') 


2. Find the resource id for the app name:

MY_RESOURCE_ID=$(access-cli resources list -q "My Example App" -o json | jq -r '.[0].id')
echo $MY_RESOURCE_ID


3. Retrieve the last access time for this UserID for this app:

access-cli records list --sort created_desc --filter-user-id $MY_USER_ID --filter-event-name accessProxyAdmittance -o json | jq '[.[] | select (.params.resource.id == $my_resource_id)][0]|{User: .user.name, Resource: .params.resource.name, LastAccess: .date}' --arg my_resource_id "$MY_RESOURCE_ID"

Example output:

{
  "User": “Susan Tran”,
  "Resource": "My Example App",
  "LastAccess": "2023-09-12T15:50:13.000Z"
}