Getting ACEs of all users of file

Nextcloud version: 27.1.3.2
Operating system and version: Ubuntu 22.04.1

Hello!
I’m trying to develop a utility that would make nextcloud auditing a little more convenient for administrators.
I’ll describe the situation:
An external storage has been allocated, which is the nextcloud data folder, and successive requests are made from under the administrator account to request all files of all users in the nextcloud.
But in such a situation, it is not possible to get ACL of files that do not belong to the administrator.
For example, the user John gave access to edit a file to the user Anna. How can I get this ACE from an administrator account?

An external storage has been allocated, which is the nextcloud data folder, and successive requests are made from under the administrator account to request all files of all users in the nextcloud.

So… just to make sure I’m understanding your setup: In Nextcloud Server you have an External Storage mounted configured that is to an external SMB backend using Global credentials as the authentication mechanism (and the credentials belong to an administrator account on the SMB store)?

But in such a situation, it is not possible to get ACL of files that do not belong to the administrator.

Where are you currently getting/seeing the ones that do belong to the administrator in Nextcloud Server?

For example, the user John gave access to edit a file to the user Anna. How can I get this ACE from an administrator account?

From inside of Nextcloud Server or from your SMB service or ?