Aggregation pipeline in data api


I am trying to execute a pipeline via the data api with api-key auth and I am getting this error:

Failed to aggregate documents: FunctionError: aggregation stage "$geoNear" is not supported in a user context. A pipeline with this stage must be run as a System User

The api key is User Type:server tho. Has anyone else experience this?

@Michael_Murray4 Based on the provided log, it appears that the problem may be related to the role or permissions of the user you are currently using…

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.