---
schema_version: "1"
id: 84ba21df942e7f49cc7898c0d2038663c82762adf8f0617dda85e45d1104670f
title: Log Out Multiple Shoppers
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/commerce-api/guides/slas-batch-logout.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/slas-batch-logout.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: a712e44c4888e2da66c8a32eee6f90eeaa5388a21781b1880e99877222997fcf
products:
  - Composable Storefront
  - Salesforce APIs
---
# Log Out Multiple Shoppers

Starting with B2C Commerce version 26.9, use the [`batchLogout`](https://developer.salesforce.com/docs/commerce/commerce-api/references/auth-admin?meta=batchLogout) endpoint of the Shopper Login and API Access Service (SLAS) Admin API to log out up to 50 shoppers across all their sessions. Identify each shopper by their login ID and authenticate the request with a [SLAS admin token](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-shopper-apis.html#get-a-slas-admin-token) or an [Account Manager access token](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html#request-an-access-token) with the appropriate permissions.

For example, use this endpoint to:

- Invalidate every session for shopper accounts affected by a security incident.
- Force reauthentication for a group of shoppers as part of an account-security or support workflow.

For a shopper-initiated logout, use the [`logoutCustomer`](https://developer.salesforce.com/docs/commerce/commerce-api/references/auth?meta=logoutCustomer) endpoint instead. That endpoint revokes the access token and the refresh token supplied by the shopper's session. Batch logout is an administrative operation and affects every session associated with each successful login ID.

## Understand the Logout Behavior

For each valid login ID, SLAS revokes all active refresh tokens and inactivates all active access tokens issued before the request. The shopper must then authenticate again using their configured login method. Batch logout doesn't change the shopper's password or other account credentials.

## Send a Batch Logout Request

### Authorize the Request

Authenticate the request with a SLAS admin token or Account Manager access token.

- For manual requests or testing, get a [SLAS admin token](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-shopper-apis.html#get-a-slas-admin-token) from the SLAS Admin UI. Your Account Manager user must have the [SLAS Organization Administrator role and the correct instance filters](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-shopper-apis.html#slas-admin-ui-set-up-user-roles-and-filters).
- For automated integrations, configure an [Account Manager API client](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html#create-an-api-client) with the Salesforce Commerce API and Sandbox API User [roles](https://help.salesforce.com/s/articleView?id=cc.b2c_account_manager_roles.htm&type=5) for the target instance, and use the client’s credentials to [request an access token](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html#request-an-access-token).

### Send the Request

Gather the access token, the short code, the tenant ID, and the site ID for the B2C Commerce instance. See [Base URL and Request Formation](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/base-url.md#configuration-values).

Send up to 50 shopper login IDs in the `loginIds` array. Login IDs are case-insensitive.

```bash
curl "https://{SHORT_CODE}.api.commercecloud.salesforce.com/shopper/auth-admin/v1/tenants/{TENANT_ID}/batch-logout?channelId={SITE_ID}" \
--request 'POST' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--data-raw '{
  "loginIds": [
    "user1@example.com",
    "user2@example.com"
  ]
}'
```

A syntactically valid request returns `200 OK` even when SLAS can't log out one or more shoppers. Check each entry in the `results` array instead of relying on the HTTP status alone. A login ID that doesn't match a shopper returns a `failure` status. Duplicate login IDs return a `not_processed` status.
