Forum Discussion
Inkey_Solutions
Jan 04, 2022Copper Contributor
Restrict users to access list using REST API
Hello, I have made a list in SharePoint, and I want to restrict the Users to access the list via REST API. So how can I turn off the ability for the users to access the list via REST API, so tha...
Jan 04, 2022
That's a different scenario...unfortunately, if the users discover the site and they have collaboration rights there, they are going to be able to modify data directly in the site. There are tow possible workarounds for you here:
(1) Hide the Lists and Document Librararies used in the PowerApp: https://www.c-sharpcorner.com/article/how-to-hide-sharepoint-list-using-pnp-powershell/
(2) Force a redirect to the SPO home page to any user trying to access the site: Develop a SPFx extension that prevent any user except especific ones to access the site.
(1) Hide the Lists and Document Librararies used in the PowerApp: https://www.c-sharpcorner.com/article/how-to-hide-sharepoint-list-using-pnp-powershell/
(2) Force a redirect to the SPO home page to any user trying to access the site: Develop a SPFx extension that prevent any user except especific ones to access the site.
Inkey_Solutions
Jan 06, 2022Copper Contributor
Thank you, for the reply. jcgonzalezmartin
I referred the link which you sent me. And after referring this link, I had some questions on which I need some help from you.
I had some questions jcgonzalezmartin ,
1. Does "after hiding" the SharePoint List, will the user be still able to access the List from the Power Apps, and make necessary changes via Power Apps only, if he has the required permissions to do so.
2. Plus, after hiding SharePoint List, would any user be able to make API calls to the List, if by any way he gets the URL of the List?
3. And does he require the URL to make API calls to the SharePoint list, at all?
I hope for a reply from you.
Thank you so much, jcgonzalezmartin
- Jan 06, 2022Hi,
My two cents here:
1. Yes, you are just hiding the list so users "apparently" only have the option to work with the data through the Power App
2. Yes, hiding does not prevent this,
3. Yes.- Inkey_SolutionsJan 06, 2022Copper Contributor
Thank you so much, jcgonzalezmartin , for your quick reply.
We need helpful people like you in this community. 🙂
- DeoCayananJul 04, 2024Copper ContributorI know this is old, but one method, if they really need to be restricted from the list is utilizing Power Automate.
Provide a view only access, which will allow them to view information via Power App. Any changes to the data, PowerApp will pass that information to Power Automate, which has "Run Only User" enabled with someone who can edit the list.
If it's a bunch of changes or multiple before updating to the list, I recommend store that information in a collection, and once they're ready they can submit it all to update the list.