Role permissions are in effect when running the script. For the role that is experiencing the issue you will need to go to "Setup" >> "Users/Roles" >> "Manage Roles" and add the "Lists -> Customers" permission. Note that this gives that role access to the customer record in the UI as well. Alternatively, if you have access to the script deployment, you can "Run As" a role that has the proper permissions without added permissions to the role itself.