All things Shopify and commerce
Hi Folks!
I am trying to test a simple query in the Shopify GraphiQL App in my testing store. While I have given all the permissions to my testing store to read the customer data. I am getting error while running the following query.
query ($query: String!) {
customers(first: 1, query: $query) {
edges {
node {
id
}
}
}
}
Error:
{
"errors": [
{
"message": "Access denied for customers field.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"customers"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/api/usage/access-scopes"
}
}
],
Can Someone please help and guide what to do to resolve this?
Hi,
This is Richard at PageFly - Shopify Advanced Page Builder app.
The error message "Access denied for customers field" indicates that the GraphiQL app in your testing store doesn't have the necessary permissions to access customer data. Here's how to resolve this:
1. Grant Read_Customers Permission:
2. Re-run the Query:
Once you've granted the Read Customers permission, go back to your GraphiQL app and re-run your query. It should now successfully retrieve customer data (specifically, the ID of the first customer matching your search criteria).
Hoping my solution helps you solve your problem.
Best regards,
Richard | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
All features are available from Free plan. Live Chat Support is available 24/7.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025