cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BenTampubolon
Frequent Visitor

How to enable SharePoint list update be done via a Service Account when clicking submit button

I want to create a feature in my powerapps that is to have the linked SharePoint list updated using a Service Account instead of the account of the user logging into powerapps. In this way, access to the SharePoint list can still restricted to the user since the update is done via a Service Account. I want to achieve this when submit button (to create or edit a record) is clicked in the Powerapps.

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@BenTampubolon 

You will not be able to achieve that easily.  The SharePoint connector will use the account that is using the app.  And, if you are working with the list in any way, the user will at least need read access to it.

 

In order to achieve what you want, you will need to enlist PowerAutomate and a separate list that the user does have read and write access to.  The mission is this:  Have your app create a record in the new list.  Then have a trigger on the list in PowerAutomate to take that record and write it into the primary list.  This would then be performed by the account that the PowerAutomate trigger is connected with.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Hi @BenTampubolon ,

A considerable workaround that has other consequences (such as the user not being able to retrieve what they have written) is to write the record (I assume only new records here) to a list, then have a Flow triggered on "When an item is created" with the Service Account connector and writing to your second list and then deleting the record in the first list. If you want to update existing records, you have to share the original list to retrieve it, so that is self-defeating.

 

Please click Accept as solution 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 Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@BenTampubolon 

You will not be able to achieve that easily.  The SharePoint connector will use the account that is using the app.  And, if you are working with the list in any way, the user will at least need read access to it.

 

In order to achieve what you want, you will need to enlist PowerAutomate and a separate list that the user does have read and write access to.  The mission is this:  Have your app create a record in the new list.  Then have a trigger on the list in PowerAutomate to take that record and write it into the primary list.  This would then be performed by the account that the PowerAutomate trigger is connected with.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks @RandyHayes , makes sense. Will wait for other suggestions but I am clear on what you propose. Thanks alot

 

Hi @BenTampubolon ,

A considerable workaround that has other consequences (such as the user not being able to retrieve what they have written) is to write the record (I assume only new records here) to a list, then have a Flow triggered on "When an item is created" with the Service Account connector and writing to your second list and then deleting the record in the first list. If you want to update existing records, you have to share the original list to retrieve it, so that is self-defeating.

 

Please click Accept as solution 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 Thumbs Up.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,148)