> ## Documentation Index
> Fetch the complete documentation index at: https://help.elationhealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Elation SSO User

> Resolve the Elation Billing user on claims, payments, and financial transactions back to the Elation EHR user.

One row per Elation EHR user / Elation Billing user / warehouse, linking each Elation Billing user to their Elation EHR user account. Use it to resolve the Elation Billing user that appears on claims, payments, and financial transactions back to the Elation EHR `user`.

This table's columns and relationships are shown in the [Hosted Database schema](/articles/hdb/schema).

<Note>
  `elation_sso_user.user_id` is the Elation EHR `user.id` and is null when the Elation EHR user has no matching user in the warehouse. `elation_billing_user_id` is an Elation Billing identifier and does not resolve to an Elation EHR user on its own.
</Note>

**For reporting on but not limited to:**

* Mapping Elation Billing users to their Elation EHR user accounts
* Finding the EHR user behind an Elation Billing user on a payment or financial transaction
* Most recent Elation Billing login per user

## Resolve an Elation Billing user to the EHR user

<CodeGroup>
  ```sql sql theme={null}
  select
      s.elation_billing_user_id
    , s.user_id
    , u.first_name
    , u.last_name
    , s.last_login
  from elation_sso_user s
    left join user u on u.id = s.user_id
  where s.is_deleted = false;
  ```
</CodeGroup>

## Payments attributed to the EHR user who created them

<CodeGroup>
  ```sql sql theme={null}
  select
      p.id as payment_id
    , p.amount
    , s.user_id as created_by_user_id
    , u.first_name
    , u.last_name
  from payment p
    left join elation_sso_user s
      on s.elation_billing_user_id = p.created_by_elation_billing_user_id
     and s.warehouse_id = p.warehouse_id
    left join user u on u.id = s.user_id
  where p.is_deleted = false;
  ```
</CodeGroup>

*If you have any questions about this topic please reach out to [Elation Support Portal](/articles/support-portal-introduction) with the subject line HDB - \<your\_question>*
