How to Retrieve User Names and Login Activity via GraphQL
search cancel

How to Retrieve User Names and Login Activity via GraphQL

book

Article ID: 450003

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

Users may need to generate a report of user names alongside their login and activity timestamps to monitor platform engagement or perform security audits.

Resolution

Use the GraphQL Explorer to fetch a list of users including their display names and recent activity markers:

  1. Access the GraphQL Explorer at the following URL: https://apps.cloudhealthtech.com/ui/graphql-explorer/

  2. Copy and paste the following query into the editor:

    query UserLogins {
      users(first: 1000) {
        pageInfo {
          hasNextPage
          endCursor
        }
        edges {
          node {
            name
            id
            lastSignIn
            lastActivity
          }
        }
      }
    }

  3. Run the query to retrieve the user nameidlastSignIn, and lastActivity fields for up to 1,000 users per page.