--- title: Authenticated Account description: >- The API for interacting with an account in which the customer is fully authenticated. api_version: 2025-10 api_name: customer-account-ui-extensions source_url: html: >- https://shopify.dev/docs/api/customer-account-ui-extensions/latest/apis/authenticated-account md: >- https://shopify.dev/docs/api/customer-account-ui-extensions/latest/apis/authenticated-account.md --- # Authenticated Account The API for interacting with an account in which the customer is fully authenticated. ## StandardApi The base API object provided to this and other `customer-account` extension targets. * authenticatedAccount AuthenticatedAccount required Information about the authenticated account. ### AuthenticatedAccount * customer Provides the customer information of the authenticated customer. ```ts SubscribableSignalLike ``` * purchasingCompany Provides the company info of the authenticated business customer. If the customer is not authenticated or is not a business customer, this value is \`undefined\`. ```ts SubscribableSignalLike ``` ```ts export interface AuthenticatedAccount { /** * Provides the company info of the authenticated business customer. * If the customer is not authenticated or is not a business customer, this value is `undefined`. */ purchasingCompany: SubscribableSignalLike; /** * Provides the customer information of the authenticated customer. */ customer: SubscribableSignalLike; } ``` ### SubscribableSignalLike Represents a read-only value managed on the main thread that an extension can subscribe to. Example: Checkout uses this to manage the state of an object and communicate state changes to extensions running in a sandboxed web worker. This interface is compatible with \[Preact's ReadonlySignal]\(https://github.com/preactjs/signals/blob/a023a132a81bd4ba4a0bebb8cbbeffbd8c8bbafc/packages/core/src/index.ts#L700-L709). Some fields are deprecated but still supported for backwards compatibility. In version 2025-10, \[\`StatefulRemoteSubscribable\`]\(https://github.com/Shopify/remote-dom/blob/03929aa8418a89d41d294005f219837582718df8/packages/async-subscription/src/types.ts#L17) was replaced with \`ReadonlySignalLike\`. Checkout will remove the old fields some time in the future. * current ```ts T ``` * destroy ```ts () => Promise ``` * subscribe ```ts (fn: (value: T) => void) => () => void ``` * value ```ts T ``` ```ts export interface SubscribableSignalLike extends ReadonlySignalLike { /** * @deprecated Use `.value` instead. */ readonly current: T; /** * @deprecated No longer needed. Use Preact Signal management instead. */ destroy(): Promise; } ``` ### Customer Information about the authenticated customer. {% include /apps/checkout/privacy-icon.md %} Requires access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data). * id Customer ID. ```ts string ``` ```ts export interface Customer { /** * Customer ID. * * @example 'gid://shopify/Customer/123' */ id: string; } ``` ### PurchasingCompany * company Include information of the company of the logged in business customer. ```ts Company ``` * location Include information of the company location of the logged in business customer. ```ts CompanyLocation ``` ```ts export interface PurchasingCompany { /** * Include information of the company of the logged in business customer. */ company: Company; /** * Include information of the company location of the logged in business customer. */ location?: CompanyLocation; } ``` ### Company * id Company ID. ```ts string ``` ```ts export interface Company { /** * Company ID. */ id: string; } ``` ### CompanyLocation * id Company location ID. ```ts string ``` ```ts export interface CompanyLocation { /** * Company location ID. */ id: string; } ``` ### Examples * #### Example ##### Extension.jsx ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default async () => { render(, document.body); }; function Extension() { const orderStatusCustomerId = shopify.authenticatedAccount.customer.value .id; const authenticatedCustomerId = shopify.authenticatedAccount.customer.value .id; if ( authenticatedCustomerId && orderStatusCustomerId?.endsWith( authenticatedCustomerId, ) ) { return ( {shopify.i18n.translate( 'manageLoyaltyPoints', )} ); } return null; } ``` ##### locales/en.default.json ```json { "manageLoyaltyPoints": "Manage Loyalty Points" } ``` ## Examples ### Examples * #### Getting the company and location of the customer ##### Description You can access the company and location of the authenticated business customer to implement location specific logic. ##### Extension.jsx ```jsx /* See the locales/en.default.json tab for the translation keys and values for this example */ import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default async () => { render(, document.body); }; function Extension() { const purchasingCompany = shopify.authenticatedAccount ?.purchasingCompany?.value; const companyLocationId = purchasingCompany?.location.id; if ( companyLocationId && isLocationClosed(companyLocationId) ) { return ( {shopify.i18n.translate( 'closedLocationMessage', )} ); } return null; } function isLocationClosed(locationId) { return true; } ``` ##### locales/en.default.json ```json { "closedLocationMessage": "This location is temporarily closed for inventory cleanup." } ```