Skip to main content

CurrentUser

Returns data like name, email, panorama access, and more about the current user signed in. Will return null if there is no user signed in. The results of this query can be affected by providing an authToken header to set a user for the operation.

CurrentUser: User

Directives

authAccess

This requires the current user to be in STUDENT role.

Type

User object

Examples

Run in Postman

Query:

CurrentUser {
CurrentUser {
id
email
firstName
abbreviatedName
asset
lastName
name
lastActiveAt
bio
twoFactorEnabled
lastInitial
invitedByName
shouldHighlight
purchasedCourses {
...PurchasedCourseFragment
}
purchasedBundles {
...PurchasedBundleFragment
}
activeLicense {
...LicenseFragment
}
allocatedLicenses {
...AllocatedLicenseFragment
}
allocatedLearningPaths {
...AllocatedLearningPathFragment
}
attendedMeetings {
...UserAttendedMeetingFragment
}
waitlistedCourses {
...WaitlistedCourseFragment
}
adminClients {
...ClientFragment
}
roleKey
address1
address2
city
state
zipCode
country
telephone
stripeCustomerId
externalCustomerId
createdAt
updatedAt
sfAccountId
sfContactId
shippingName
client {
...ClientFragment
}
clientId
ref1
ref2
ref3
ref4
ref5
ref6
ref7
ref8
ref9
ref10
lang
customFields
recommendedTags {
...UserRecommendedTagFragment
}
recommendedSlugs {
...UserRecommendedSlugFragment
}
accessedFlows
disabled
learnerUserId
managerUserId
balance
mustVerifyEmail
certificatesCount
collaborationsCount
availableCoursesCount
startedCoursesCount
completedCoursesCount
}
}

Variables:

{ul}

Response:

{
"data": {
"CurrentUser": {
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"email": "xyz789",
"firstName": "abc123",
"abbreviatedName": "abc123",
"asset": "xyz789",
"lastName": "abc123",
"name": "xyz789",
"lastActiveAt": "2023-12-20T16:58:58.782Z",
"bio": "xyz789",
"twoFactorEnabled": true,
"lastInitial": "abc123",
"invitedByName": "xyz789",
"shouldHighlight": false,
"purchasedCourses": [
"PurchasedCourse"
],
"purchasedBundles": [
"PurchasedBundle"
],
"activeLicense": "License",
"allocatedLicenses": [
"AllocatedLicense"
],
"allocatedLearningPaths": [
"AllocatedLearningPath"
],
"attendedMeetings": [
"UserAttendedMeeting"
],
"waitlistedCourses": [
"WaitlistedCourse"
],
"adminClients": [
"Client"
],
"roleKey": "xyz789",
"address1": "xyz789",
"address2": "abc123",
"city": "abc123",
"state": "abc123",
"zipCode": "abc123",
"country": "abc123",
"telephone": "xyz789",
"stripeCustomerId": "58ccb96c-8e90-4464-86e0-f284442981df",
"externalCustomerId": "58ccb96c-8e90-4464-86e0-f284442981df",
"createdAt": "2023-12-20T16:58:58.782Z",
"updatedAt": "2024-06-20T16:58:58.782Z",
"sfAccountId": "58ccb96c-8e90-4464-86e0-f284442981df",
"sfContactId": "58ccb96c-8e90-4464-86e0-f284442981df",
"shippingName": "abc123",
"client": "client-1",
"clientId": "client-1",
"ref1": "xyz789",
"ref2": "abc123",
"ref3": "abc123",
"ref4": "xyz789",
"ref5": "xyz789",
"ref6": "abc123",
"ref7": "xyz789",
"ref8": "abc123",
"ref9": "abc123",
"ref10": "abc123",
"lang": "xyz789",
"customFields": "{}",
"recommendedTags": [
"UserRecommendedTag"
],
"recommendedSlugs": [
"UserRecommendedSlug"
],
"accessedFlows": [
"xyz789"
],
"disabled": true,
"learnerUserId": "58ccb96c-8e90-4464-86e0-f284442981df",
"managerUserId": "58ccb96c-8e90-4464-86e0-f284442981df",
"balance": 236.56,
"mustVerifyEmail": false,
"certificatesCount": 678,
"collaborationsCount": 678,
"availableCoursesCount": 678,
"startedCoursesCount": 678,
"completedCoursesCount": 678
}
}
}