Skip to main content
Community site session details

Community site session details

Session Id : dTK45CSSJLDY58QMgRzxvX
Power Apps - Power Apps Pro Dev & ISV
Suggested answer

How to authenticate data source by service principal rather than the logged in user

Like (0) ShareShare
ReportReport
Posted on 3 Jan 2025 08:49:13 by
I have made an app which connects to a sharepoint list to retrieve and write data.
 
So far I have not found any way to avoid giving access to end users directly to the actual Microsoft List. 
This give them access to open up the list directly in Sharepoint and they have the possibility of entering/deleting data directly from this GUI.
 
What I want to have, is the end users authenticating with their org.user to my app, then Power Apps is using a service principal to authenticate to the Microsoft List. 
This keeps the control of the list entries to me (admin) while users have the ability to insert/amend their records through the developed app in Power Apps.
 
I am aware of the Power Automate workaround, but this is very tedious and complicated way of achieving this simple task.
 
Let me know if there is any alternative solution.
  • WarrenBelz Profile Picture
    149,102 Most Valuable Professional on 07 Jan 2025 at 21:21:31
    How to authenticate data source by service principal rather than the logged in user
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance.

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • Suggested answer
    Artur Stepniak Profile Picture
    1,526 Super User 2025 Season 2 on 03 Jan 2025 at 12:19:01
    How to authenticate data source by service principal rather than the logged in user
    Hello,
     
    as Warren said, that's it. You can workaround it by using a flow to perform CRUD operations on the list. And I'd argue that it's a complicated way, just instead of Patch() you're using Run() with input parameters.
     
    In case of any other questions, let me know. If the answer helped you, mark it, so that others can benefit from it.
     
    Best regards,
     
    Artur Stepniak
    Interested in GenAI? Visit my site!
  • Suggested answer
    WarrenBelz Profile Picture
    149,102 Most Valuable Professional on 03 Jan 2025 at 11:36:44
    How to authenticate data source by service principal rather than the logged in user
    Quite simply, any connections to data sources in Power Apps are run in the context of the logged-in user and are authenticated when the user first opens the app, meaning the logged-in user must have appropriate permissions in SharePoint. There are a couple of things you can do in SharePoint - one is as per this blog of mine and simply stop the user changing anything.
    The other is to give them a Custom Permission in SharePoint based on Contribute with View Application Pages unchecked. This should prevent them from accessing any view on the applicable List/s.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete