When using 3-legged authentication, and a user only has permissions to a child folder, the hubs/:hub_id/projects/:project_id/topFolders
endpoint only returns the child folder, not the parent folders (“Project Files” etc…).
Because of that, we can’t show a tree like in ACC, where the parent folders (where the user doesn’t have permissions) are grayed out.
When using 2-legged authentication, without user context, we get all folders, as expected.
You can observe the same behaviour in the VSCode APS extension.
I guess a workaround is to request the folders twice, ones with and once without user context, and then combine the results.
But I wonder if I missed an API, or a parameter, which returns folders as shown in ACC.