I have a script that downloads Survey123 data using the ArcGIS REST API. The script takes Survey123 Form items, then using the /relatedItems endpoint, retrieves the hosted feature layer item, exports it and downloads it.
I noticed that if the related hosted feature layer's share level is set to private, the relatedItems endpoint cannot find it. This would make sense, except the AGOL Account making these requests has a custom member role giving it the Administrative > Content > View All privilege. The Account can see both the Survey123 Form item and the hosted feature layer when browsing in AGOL but gets no results using the /relatedItems endpoint. If the related items are shared to the organization or public, then there is no issue. We have also run the same requests with an actual Administrator account, and it successfully returns the related hosted feature layer.
Has anyone else encountered this issue, are there any known bugs related to this problem? An account with that administrative privilege should be able to see all related items, no matter the share level, correct?
Thanks!