BuyerIdentity always returning null?

I have a product discount function that needs to check if the product is of a certain type and if the customer has a certain tag. The issue is that I cannot seem to get anything back from the BuyerIdentity object.

This is my query:

I have ‘read_customers’ in my access scopes:
scopes = "write_products, read_products, write_discounts, read_discounts, read_customers"

I have made sure that I am logged in during testing, but I always seem to get a null return.
{"cart":{"buyerIdentity":null, ...}}

I followed the tutorial in the docs and used documentation to double check my code, but I’ve exhausted all the online resources available.
Any ideas why this is happening?

If anyone is curious, the buyerIdentity was returning null on my test store, but in production it is working correctly and returning details. I’m sure there is a setting or something to fix this on the test store, but I basically had to test and debug in production.

Glad you figured this out! Logging this issue as it would be a better dev experience to be able to configure on your test environment.