Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian cookies and tracking notice, (opens new window)
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
/
Find the Last Time a Particular User Accessed a Specific / Any App
Published Jan 07

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

Subscribe

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" }





 




We value your feedback.
If you have questions, suggestions, or feedback on our documentation, contact the Campus Product Documentation team.
For general product inquiries or technical support, please contact the global Barracuda Support team.

🔍 Discover Our Product Documentation

Barracuda CloudGen Access
Results will update as you type.
  • Getting Started
  • Deployment
  • CloudGen Access Console
  • CloudGen Access Application
  • CloudGen Access User Directory Connector
  • CloudGen Access Proxy
  • CloudGen Access CLI Client
    • How to Set the CloudGen Access Console Endpoint
    • How to Use the Admin API
    • Batch Mode Operations
    • Using access-cli
      • CloudGen Access CLI Client Usage Examples
        • Export List of Enrolled Users to a CSV File
        • Find the Last Time a Particular User Accessed a Specific / Any App
        • List All Devices and Limit Result Fields
        • List All Devices and Limit Result Fields to ID
        • List All Devices Created Before Given Date
        • List all Devices That Haven't Reported for More Than 7 Days and Limit Result Fields
        • List all devices with specific username
        • Manage User Enrollments
        • Revoke All Enrollment Links From Tenant
    • Configuration File
    • Credentials File
  • FAQ
  • Best Practices
  • Maintenance
  • Troubleshooting
  • Release Notes
  • Glossary
  • Security Advisories

    You‘re viewing this with anonymous access, so some content might be blocked.
    {"serverDuration": 12, "requestCorrelationId": "4c8fc82e6c55420eacfdf21a5b9b51f2"}