0

I come from ASP.NET with SQL server web development. where the database is not exposed to the end users, and we interact with the database using service account inside the connection string. but in SharePoint things by default are different. Where all users can access the SharePoint lists. so my question, does SharePoint online support a scenario, where we can block the users from accessing the SharePoint lists (using built-in forms, API call, etc ) so they do not have any permissions on the lists and instead we interact with SharePoint from Power Apps or other means using a service account. so we can apply all the business logic and validation we want inside the code (Power Apps or custom application which interact with SharePoint)?

Thanks

2
  • sure you can do it. Try it! Nov 16, 2022 at 20:39
  • @DerekGusoff but how we can do so? users will interact with SharePoint tables using their credentials and if they do not have any permission then how they will read,edited & delete.. can you advice more?
    – John John
    Nov 16, 2022 at 22:05

2 Answers 2

1

I don't think you can do what you want with Power Apps, but that's not my area of expertise. However, you could build a custom .NET application to do this. Here's the general process:

  • Remove all access to the lists and libraries for the users
  • Register an application with Azure AD and grant it the Microsoft Graph or SharePoint API application permissions you'll need for the application
  • Build a custom .NET application that uses the access token you get after authenticating with Azure AD to do data access with SharePoint

enter image description here

enter image description here

There are several Microsoft Learn training modules that can help you with the Azure AD app registration, using the MSAL library to authenticate with Azure AD and get an access token, and using Microsoft Graph.

https://learn.microsoft.com/en-us/training/

It's important to note that if you do this, you'll lose the ability to track who created and modified list items because the CRUD operations on SharePoint will be done using the Azure app identity, not the identity of the current user.

enter image description here

1
  • ok fine, i will created a custom CreatedBy & ModifiedBy fields in this case,, but can i build a regular asp.net mvc core?or it has to have certain standards to work with SharePoint ?
    – John John
    Nov 19, 2022 at 22:15
0

If users want to interact with SharePoint lists from Power Apps or other means, they should have at least read permissions to the SharePoint list. When a user has read permissions to a SharePoint list, all users can access the SharePoint list. For more information about Permission of SharePoint list with Powerapps:

https://powerusers.microsoft.com/t5/Building-Power-Apps/PowerApps-and-Sharepoint-List-access-permission/td-p/54527

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.