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

# Investigate a risky user

> Find a risky user in the analytics dashboard, see what it is linked to and why, and act on it in your backend.

<Note>
  This page describes the new analytics dashboard, which is rolling out to all accounts.
</Note>

This tutorial follows one account from the Overview to your backend. You find the users that need a look, narrow them to one, read its user card, check the identification that set its band, and then act on the account in your backend. It uses the analytics dashboard and the History API, and it takes a few minutes.

## What you will learn

* How to find risky users and users with a High-Risk Event for any period.
* How to read a user card: its band, its High-Risk Events and the devices, visitors and IP addresses linked to it.
* How to read the same account through the History API and act on it at its next sensitive action.

## Before you start

* **The authenticated snippet on your signed-in pages.** Pass a hashed User HID with `checkAuthenticatedUser` on every signed-in page. Users, account-level risk and all four High-Risk Events are built on it. See [Identify signed-in users](/setup/snippet#identify-signed-in-users).
* **Access to the analytics dashboard**, and your domain's **Private API Key** for Step 5 ([API keys](/setup/keys)). No account yet? [Start Free](https://app.shieldlabs.ai/) with 5,000 identifications, one time, no credit card.

## Step 1: Find risky users

Open **Overview** and pick a period at the top, for example **Last 7 days**. Two panels answer the first question:

* **Users** splits the accounts active in the period into **Trusted**, **Risky users** and **High-Risk Event users**.
* **High-Risk Events** shows how many users have each of the four events, Multi-accounting, Account sharing, Impossible travel and Account takeover, at **Medium confidence** and at **High confidence**, counted for the users active in the selected period.

Select the arrow next to the user count at the top of the **Users** panel (its tooltip reads Explore users), or one of its tiles, to open the Users tab of Analytics.

<Frame caption="Users and High-Risk Events on the Overview screen of the analytics dashboard, counted for the users active in the selected period.">
  <img className="block dark:hidden" src="https://mintcdn.com/shieldlabs-725d18f1/JyleDzUFYU3SXP4Q/images/dashboard/overview-users-events.png?fit=max&auto=format&n=JyleDzUFYU3SXP4Q&q=85&s=21cb085be89557f64f5578bc0bdd2ee5" alt="The Users and High-Risk Events panels of the analytics dashboard: 1,240 users split into 1,090 Trusted, 104 Risky users and 46 High-Risk Event users; Multi-accounting 22 users (14 Medium, 8 High confidence), Account sharing 12 (8 Medium, 4 High), Impossible travel 7 (5 Medium, 2 High) and Account takeover 5 (3 Medium, 2 High)." width="866" height="1170" data-path="images/dashboard/overview-users-events.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/shieldlabs-725d18f1/JyleDzUFYU3SXP4Q/images/dashboard/overview-users-events-dark.png?fit=max&auto=format&n=JyleDzUFYU3SXP4Q&q=85&s=7bbf0082db16276cc00eefb254288dcd" alt="The Users and High-Risk Events panels of the analytics dashboard in the dark theme: 1,240 users split into 1,090 Trusted, 104 Risky users and 46 High-Risk Event users; Multi-accounting 22 users (14 Medium, 8 High confidence), Account sharing 12 (8 Medium, 4 High), Impossible travel 7 (5 Medium, 2 High) and Account takeover 5 (3 Medium, 2 High)." width="866" height="1170" data-path="images/dashboard/overview-users-events-dark.png" />
</Frame>

## Step 2: Narrow the list

In **Analytics**, on the **Users** tab, narrow the list one of two ways:

1. **By event.** Open **Filters**, pick **High-Risk Events**, tick **Multi-accounting** and select **Done**. The table keeps the users with that event.
2. **By band.** Select the **Dangerous** band pill to keep the users with at least one Dangerous identification in the period.

A High-Risk Event is a separate axis from the band, so a user with a Multi-accounting event can be Trusted on every identification. Review an event on its own, and add the band pill when you want the users that are both. Each row shows the user's band, its identifications and how many devices, visitors and countries are linked to it; the user card in Step 3 shows the event and its confidence. Keep the combination with **Views** to open it again tomorrow.

<Frame caption="Users with a Multi-accounting event in the analytics dashboard.">
  <img className="block dark:hidden" src="https://mintcdn.com/shieldlabs-725d18f1/JyleDzUFYU3SXP4Q/images/dashboard/analytics-users-hre-filter.png?fit=max&auto=format&n=JyleDzUFYU3SXP4Q&q=85&s=7e6bf860b2155e511c189dd1ee15b5f8" alt="The Users tab of the analytics dashboard filtered to users with a Multi-accounting event, the filter chip high_risk_event:multi_accounting on the chart card: 22 users, 9 Trusted, 6 Suspicious and 7 Dangerous, each with its band, identifications, devices, unique visitors and public IPs." width="2880" height="1742" data-path="images/dashboard/analytics-users-hre-filter.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/shieldlabs-725d18f1/JyleDzUFYU3SXP4Q/images/dashboard/analytics-users-hre-filter-dark.png?fit=max&auto=format&n=JyleDzUFYU3SXP4Q&q=85&s=ebc96d7e462f2023a319955e3617e311" alt="The Users tab of the analytics dashboard in the dark theme filtered to users with a Multi-accounting event, the filter chip high_risk_event:multi_accounting on the chart card: 22 users, 9 Trusted, 6 Suspicious and 7 Dangerous, each with its band, identifications, devices, unique visitors and public IPs." width="2880" height="1742" data-path="images/dashboard/analytics-users-hre-filter-dark.png" />
</Frame>

## Step 3: Open the user card

Select a User HID in the table to open its [user card](/dashboard/entity-card). Read three things, numbered on the screenshot:

1. **The band**: the worst band of the user's identifications in the period. The band split under it shows how many identifications fell in each band, so one Dangerous identification among ten Trusted ones stands out.
2. **The High-Risk Event**: the pill names the event, and its colour gives the confidence, red for High and orange for Medium. These are the colours of the Dangerous and Suspicious bands, but the pill is an event, separate from the band.
3. **Linked devices**: open the counter to list every device the account used, each with the band of the account's identifications on it. Open a device to see every other account on it under **Linked accounts**.

Linked visitors and public IPs list the same way, each with a band, and each opens its own card. **Linked local IPs** lists the addresses the browser itself reported, with their identification counts; a local IP can differ from the public IP behind a VPN or proxy.

<Frame caption="The user card in the analytics dashboard: 1 its band for the period, 2 its High-Risk Event (red pill: High confidence), 3 the devices linked to it.">
  <img className="block dark:hidden" src="https://mintcdn.com/shieldlabs-725d18f1/JyleDzUFYU3SXP4Q/images/dashboard/user-card-callouts.png?fit=max&auto=format&n=JyleDzUFYU3SXP4Q&q=85&s=d0716e64bf54c5c4f180cfd1f71c1cbe" alt="The user card for User HID a91f3c7e5b2d4086 in the analytics dashboard with three numbered callouts: 1 the Dangerous band pill, 2 the red Multi-accounting pill (High confidence), 3 the Linked devices counter showing 2." width="2254" height="770" data-path="images/dashboard/user-card-callouts.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/shieldlabs-725d18f1/JyleDzUFYU3SXP4Q/images/dashboard/user-card-callouts-dark.png?fit=max&auto=format&n=JyleDzUFYU3SXP4Q&q=85&s=6b5a907b53f3f611ef8599d30ff1afab" alt="The user card for User HID a91f3c7e5b2d4086 in the analytics dashboard in the dark theme with three numbered callouts: 1 the Dangerous band pill, 2 the red Multi-accounting pill (High confidence), 3 the Linked devices counter showing 2." width="2254" height="770" data-path="images/dashboard/user-card-callouts-dark.png" />
</Frame>

## Step 4: Check what drove the band

Scroll to **Identifications** at the bottom of the user card and expand the Dangerous identification (its Risk Score column shows the band). The expanded [identification card](/dashboard/identification-card) shows the Risk Score and each risk signal with its weight: here Anti-detect Browser (60) and Proxy (10) make 70, Dangerous.

Read a high Risk Score together with its named risk signals and the user's history. A real customer on a corporate VPN can reach the Suspicious band; the signals show why, and you choose the action for each case.

<Frame caption="The Risk Score of one identification and each risk signal with its weight, in the analytics dashboard.">
  <img className="block dark:hidden" src="https://mintcdn.com/shieldlabs-725d18f1/JyleDzUFYU3SXP4Q/images/dashboard/identification-score-signals.png?fit=max&auto=format&n=JyleDzUFYU3SXP4Q&q=85&s=3afb420d98939a5a88c868d7a076c962" alt="The Risk Score gauge at 70.00, Dangerous, and the Risk signals table of one identification in the analytics dashboard: Anti-detect Browser with weight 60 and Proxy with weight 10." width="2238" height="440" data-path="images/dashboard/identification-score-signals.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/shieldlabs-725d18f1/JyleDzUFYU3SXP4Q/images/dashboard/identification-score-signals-dark.png?fit=max&auto=format&n=JyleDzUFYU3SXP4Q&q=85&s=f8c03e36f9a68169c9a9710c004f1b2b" alt="The Risk Score gauge at 70.00, Dangerous, and the Risk signals table of one identification in the analytics dashboard in the dark theme: Anti-detect Browser with weight 60 and Proxy with weight 10." width="2238" height="440" data-path="images/dashboard/identification-score-signals-dark.png" />
</Frame>

## Step 5: Act in your backend

High-Risk Events are available in the analytics dashboard, the API and webhooks. When you review one in the analytics dashboard, as in the steps above, act on the account: read it in your backend by its User HID, record your decision, and check that record at the account's next sensitive action. The Risk Score and risk signals of the identification remain the input at that action.

<Steps>
  <Step title="Read the account">
    Read every identification of the account from the History API by `user_hid`. Reads use none of your included identifications.

    ```bash theme={null}
    curl "https://account.shieldlabs.ai/api/v1/history/user_hid/a91f3c7e5b2d4086?limit=100&offset=0" \
      -H "Authorization: Bearer sec_your_private_api_key"
    ```

    In code, the `accountView` and `accountsBehindDevice` helpers from the [tutorials overview](/use-case#the-shared-helpers) roll the newest 100 identifications up into an account view like the one on the user card:

    ```js theme={null}
    const account = await accountView('a91f3c7e5b2d4086');
    // { identifications, worstBand, devices, visitors, publicIps, countries }

    const sharedDevices = [];
    for (const deviceId of account.devices) {
      const accounts = await accountsBehindDevice(deviceId); // distinct accounts on this device
      if (accounts > 1) sharedDevices.push({ deviceId, accounts });
    }
    ```

    [Read every identification of one account](/api/server-api#read-every-identification-of-one-account) covers paging with `offset`.
  </Step>

  <Step title="Record your decision">
    Store the account and the devices linked to it, with the reason you saw in the analytics dashboard.

    ```js theme={null}
    // watchlist: a table in your datastore, keyed by User HID and Device ID
    await watchlist.add({
      userHid: 'a91f3c7e5b2d4086',
      reason: 'Multi-accounting, High confidence',
      worstBand: account.worstBand,
      devices: [...account.devices],
    });
    ```
  </Step>

  <Step title="Check it at the next sensitive action">
    At a payout, a promo claim or a signup bonus, check the incoming identification against your watchlist, next to its own Risk Score and risk signals. `waitForScore` and `band` are helpers from the [tutorials overview](/use-case#the-shared-helpers) as well.

    ```js theme={null}
    app.post('/api/payout', async (req, res) => {
      const userHid = req.user.hashedId;
      const risk = await waitForScore(req.body.shieldlabsRequestId, 2000);
      if (!risk) return res.status(202).json({ status: 'review' });
      if (risk.user_hid !== userHid) return res.status(202).json({ status: 'review' });
      if (risk.risk_score > 100) return res.status(202).json({ status: 'review' }); // 999 rate-limit marker

      const flags = risk.detection_flags ?? {};
      const signals = risk.signals ?? []; // null on the History fallback

      if (await watchlist.matches(userHid, risk.device_id)) {
        return res.status(202).json({ status: 'review' }); // you choose the action for each case
      }
      if (
        band(risk.risk_score) === 'Dangerous' ||
        flags.anti_detect_browser ||
        signals.some((s) => s.name === 'browser_automation')
      ) {
        return res.status(202).json({ status: 'review' });
      }
      return res.json({ status: 'approved' });
    });
    ```

    Choose the action for each case (allow, step up, review or block) in your backend. ShieldLabs stops fraud and abuse and helps block fraudulent and abusive traffic.
  </Step>
</Steps>

## Summary

* The Overview's **Users** and **High-Risk Events** panels show how many accounts need a look in the period.
* **Analytics** narrows them by event or by band, and the **user card** shows the account's band, its High-Risk Events and every device, visitor and IP linked to it.
* The **identification card** shows the risk signals and weights behind the band.
* In your backend, read the account by `user_hid`, record your decision, and check it at the account's next sensitive action.

## Next steps

<CardGroup cols={3}>
  <Card title="User and device cards" icon="user" href="/dashboard/entity-card">
    Everything on a user, device, visitor or IP card.
  </Card>

  <Card title="High-Risk Events" icon="triangle-exclamation" href="/features/high-risk-events">
    The four events detected on your users, at Medium or High confidence.
  </Card>

  <Card title="Acting on High-Risk Events" icon="code" href="/guides/acting-on-risk-score#acting-on-high-risk-events">
    Turn a reviewed event into an action in your backend.
  </Card>

  <Card title="Users, devices, visitors and IPs" icon="users" href="/concepts/entities">
    The five identities and how they link.
  </Card>

  <Card title="Risk signals" icon="list-check" href="/features/risk-signals">
    Every risk signal with its weight.
  </Card>

  <Card title="Multi-accounting tutorial" icon="people-group" href="/use-case/multi-accounting">
    Catch one person running many accounts at signup and at the reward.
  </Card>
</CardGroup>
