Forum Discussion
mschlue
Aug 10, 2022Copper Contributor
SharePoint API won't return readOnly fields
Hello everyone, we try to get all the attributes from a file in SharePoint using the API. When we call /_api/web/lists(...)/items and filter for the wanted file we get all attributes like name, id, ...
kalpeshvaghela
Aug 10, 2022Iron Contributor
/_api/web/lists(...)/items will not return read-only fields
Here you can use new API to get list items i.e. RenderListDataAsStream which can return read only fields as well.
Reference Links
- SPFX - https://www.eliostruyf.com/using-sharepoint-renderlistdataasstream-api-fetch-lookup-single-managed-metadata-field-values/
- CSOM - https://docs.microsoft.com/en-us/dotnet/api/microsoft.sharepoint.client.list.renderlistdataasstream?view=sharepoint-csom
I have tried in SPFX web part and I am receiving all the read only field values
Hope it will helpful to you and if so then please mark this as best response and like this answer for better reach of the questions to other persons.