All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
$query = <<<'GRAPHQL'
query {
order(id: "gid://shopify/Order/11111") {
id
name
staffMember {
id
name
}
I am getting this error
{"errors":[{"message":"Access denied for staffMember field. Required access: `read_users` access scope. Also: The app must be a finance embedded app or installed on a Shopify Plus or Advanced store. Contact Shopify Support to enable this scope for your app.","locations":[{"line":5,"column":5}],"path":["order","staffMember"],"extensions":{"code":"ACCESS_DENIED","documentation":"https://shopify.dev/api/usage/access-scopes","requiredAccess":"`read_users` access scope. Also: The app must be a finance embedded app or installed on a Shopify Plus or Advanced store. Contact Shopify Support to enable this scope for your app."}}],"data":{"order":{"id":"gid://shopify/Order/4480361398401","name":"CM49733","staffMember":null}},"extensions":{"cost":{"requestedQueryCost":2,"actualQueryCost":2,"throttleStatus":{"maximumAvailable":20000.0,"currentlyAvailable":19998,"restoreRate":1000.0}}}}
}
}
GRAPHQL;
i need using this query get admin username
Hey @pramod1222,
You are seeing this error because the `staffMember` field in the Shopify GraphQL API requires special permissions. To access it, your app must have the `read_users` scope and be either a finance embedded app or installed on a Shopify Plus or Advanced plan. If your store doesn't meet these conditions, the field will return `null`, and there’s no alternative way to programmatically retrieve the admin username through this query.
Hey,
how we can get that read_users permission? also who can provide access
Hi
i need to grant read_users permission but in my store it not visible how can i give this scope permisssion?
Hi,
Requires read_users access scope. Also: The app must be a finance embedded app or installed on a Shopify Plus or Advanced store. Contact Shopify Support to enable this scope for your app. So please enable this scope its urgent