How to check if a user has logged into Palantir before?

I’m looking for a way to verify if a user has previously logged into Palantir. The documentation doesn’t seem to provide a direct method for this. Is there a feature or a workaround that can be used to track user logins, including a history of past logins?

You can get a list of (up to 10) recent logins for your own user ID with:

curl -X POST \
    -H "Content-type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    "https://$HOSTNAME/multipass/api/user-logins?size=1" \
    -d '["<user ID>"]'

However, fetching recent logins for other users requires administrative permissions, so is generally not allowed.

Thanks! So I have a client request to check if a particular user has ever logged into foundry/ a specific foundry workspace. Is there any way in which I can check for that?

No, only platform admins can do that (with the above API).

Audit Logs are an appropriate and effective way for an Organization administrator to retrieve this information. A user login event will have the userLogin category, and per the documentation, in Audit V2, this category can be accessed via either a single object field _category or an array field _categories within the request_params JSON column. I believe that for the login event, a single object field _category is used.

You can check if a user has ever logged in to Foundry by just checking if their user account exists. Accounts are generally not created until first login.

You can see this at <YOUR_FOUNDRY_URL>.com/workspace/settings/users → Or navigating from the gear icon in the lower left.

Sometimes user accounts are pre-registered, but even then the UI will tell you that the user is pre-registered and not actually created.