I have run into an issue where I've clicked the "Customize Forms" from a SharePoint list to create a form in PowerApps. I built out my form on a service account and used that service account to connect to SharePoint to get data from the list. Now, whenever anyone submits an item, SharePoint says the "Created By" and "Modified By" are the service account, not the actual user who created or edited the item. However, PowerApps does in fact know who the correct user is, as evidenced by using "User().Email" and it displays the currently logged in user, not the service account that created the form.
Is this a known issue? Is there some way to force users to connect to the PowerApp with their own SharePoint connection?
I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:
Please check if the other users use same service account to create connection to the SP list within this shared app.
The User().Email formula could only be used to detect the current sign in account of this shared app, it could not detect which account used to create a connection to the SP list within this shared app.
Please make sure the other users use their own SP account to create a connection to the SP list within this shared app.
Note: I assume that the end users all have permission to access the SP list data source within this shared app.
If the issue still exists, please consider take a try to remove/delete the custom form from the SP list, then re-create a new one for it, check if the issue is solved.
I had a coworker try it out and the Created By correctly reported his account, not the service account.
I had previously added the service account to my SharePoint connections on my personal account, so that as I build apps out I can make sure they outlive my account and don't stop working whenever I separate from my employer. I think my account is now defaulting to the service account for SharePoint connections in PowerApps..Is there a way to choose my default connection?
This kind of concerns me, because that means security of forms could be circumvented by a lot of our technical staff who do the same. We have a lot of shared service accounts too, so it would also be hard to prove who was using/accessing the PowerApp.