--- title: staffMember - GraphQL Admin description: The StaffMember resource, by ID. api_version: 2025-10 api_name: admin type: query api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/queries/staffMember?example=retrieves-a-single-user md: https://shopify.dev/docs/api/admin-graphql/latest/queries/staffMember.md?example=retrieves-a-single-user --- # staff​Member query The StaffMember resource, by ID. ## Arguments * id [ID](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) The ID of the staff member to return. If no ID is provided, then the staff member making the query (if any) is returned. *** ## Possible returns * Staff​Member [Staff​Member](https://shopify.dev/docs/api/admin-graphql/latest/objects/StaffMember) Represents the data about a staff member's Shopify account. Merchants can use staff member data to get more information about the staff members in their store. *** ## Examples * ### Retrieves a single user #### Query ```graphql query StaffMember($id: ID!) { staffMember(id: $id) { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone } } ``` #### Variables ```json { "id": "gid://shopify/StaffMember/902541635" } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query StaffMember($id: ID!) { staffMember(id: $id) { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone } }", "variables": { "id": "gid://shopify/StaffMember/902541635" } }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query StaffMember($id: ID!) { staffMember(id: $id) { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone } }`, { variables: { "id": "gid://shopify/StaffMember/902541635" }, }, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query StaffMember($id: ID!) { staffMember(id: $id) { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone } } QUERY variables = { "id": "gid://shopify/StaffMember/902541635" } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `query StaffMember($id: ID!) { staffMember(id: $id) { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone } }`, "variables": { "id": "gid://shopify/StaffMember/902541635" }, }, }); ``` #### Response ```json { "staffMember": { "active": true, "avatar": { "url": "https://cdn.shopify.com/s/files/1/2637/1970/users/foo.jpg?v=1731443626" }, "email": "bob@example.com", "exists": true, "firstName": "bob", "id": "gid://shopify/StaffMember/902541635", "initials": [ "b", "b" ], "isShopOwner": true, "lastName": "bobsen", "locale": "en", "name": "bob bobsen", "phone": null } } ``` * ### Retrieves the currently logged-in user #### Query ```graphql query { staffMember { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone privateData { accountSettingsUrl createdAt } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query { staffMember { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone privateData { accountSettingsUrl createdAt } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query { staffMember { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone privateData { accountSettingsUrl createdAt } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query { staffMember { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone privateData { accountSettingsUrl createdAt } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query { staffMember { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone privateData { accountSettingsUrl createdAt } } }`, }); ``` #### Response ```json { "staffMember": { "active": true, "avatar": { "url": "https://cdn.shopify.com/s/files/1/2637/1970/users/foo.jpg?v=1731443626" }, "email": "bob@example.com", "exists": true, "firstName": "bob", "id": "gid://shopify/StaffMember/902541635", "initials": [ "b", "b" ], "isShopOwner": true, "lastName": "bobsen", "locale": "en", "name": "bob bobsen", "phone": null, "privateData": { "accountSettingsUrl": "https://www.snowdevil.ca/admin/settings/account/902541635", "createdAt": "2005-01-01T00:00:00Z" } } } ``` [Open in GraphiQL](http://localhost:3457/graphiql?query=query%20StaffMember\(%24id%3A%20ID!\)%20%7B%0A%20%20staffMember\(id%3A%20%24id\)%20%7B%0A%20%20%20%20active%0A%20%20%20%20avatar%20%7B%0A%20%20%20%20%20%20url%0A%20%20%20%20%7D%0A%20%20%20%20email%0A%20%20%20%20exists%0A%20%20%20%20firstName%0A%20%20%20%20id%0A%20%20%20%20initials%0A%20%20%20%20isShopOwner%0A%20%20%20%20lastName%0A%20%20%20%20locale%0A%20%20%20%20name%0A%20%20%20%20phone%0A%20%20%7D%0A%7D\&variables=%7B%0A%20%20%22id%22%3A%20%22gid%3A%2F%2Fshopify%2FStaffMember%2F902541635%22%0A%7D) ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query StaffMember($id: ID!) { staffMember(id: $id) { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone } }`, { variables: { "id": "gid://shopify/StaffMember/902541635" }, }, ); const json = await response.json(); return json.data; } ``` ##### GQL ``` query StaffMember($id: ID!) { staffMember(id: $id) { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone } } ``` ##### cURL ``` curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query StaffMember($id: ID!) { staffMember(id: $id) { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone } }", "variables": { "id": "gid://shopify/StaffMember/902541635" } }' ``` ##### React Router ``` import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query StaffMember($id: ID!) { staffMember(id: $id) { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone } }`, { variables: { "id": "gid://shopify/StaffMember/902541635" }, }, ); const json = await response.json(); return json.data; } ``` ##### Node.js ``` const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `query StaffMember($id: ID!) { staffMember(id: $id) { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone } }`, "variables": { "id": "gid://shopify/StaffMember/902541635" }, }, }); ``` ##### Ruby ``` session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query StaffMember($id: ID!) { staffMember(id: $id) { active avatar { url } email exists firstName id initials isShopOwner lastName locale name phone } } QUERY variables = { "id": "gid://shopify/StaffMember/902541635" } response = client.query(query: query, variables: variables) ``` ## Input variables JSON ```json { "id": "gid://shopify/StaffMember/902541635" } ``` ## Response JSON ```json { "staffMember": { "active": true, "avatar": { "url": "https://cdn.shopify.com/s/files/1/2637/1970/users/foo.jpg?v=1731443626" }, "email": "bob@example.com", "exists": true, "firstName": "bob", "id": "gid://shopify/StaffMember/902541635", "initials": [ "b", "b" ], "isShopOwner": true, "lastName": "bobsen", "locale": "en", "name": "bob bobsen", "phone": null } } ```