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

Flow not populating created by correctly

I am using a SharePoint List with PowerApps. The PowerApp form was created with a generic O365 account. I use that same generic O365 account to create the flow in Power Automate. The trigger is a new item added to the list. The challenge is that the "Created By DisplayName" dynamic content or "Created By Email" is not grabbing the person that is filling out the PowerApp form but rather the generic O365 account. Am I missing a basic step here?

 

I'm not sure how to get around this but it is kind of a deal breaker if I can't determine who is submitting the form.

 

Any ideas?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Flow not populating created by correctly

Yes, If you created the original connection using a generic account then that is the connection tied to your account. But when other people use the App they will be prompted to create their own connections and those will be under their account.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

12 REPLIES 12
Highlighted
Dual Super User III
Dual Super User III

Re: Flow not populating created by correctly

Hi
I see your point, when item is created via Flow, the user identified in Created by is the owner of the Flow, not the one executing it...

But please note according to this post:
https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Modified-By-field-in-sharepoint-lis...
If you edit the same item in PowerApps, the 'ModifiedBy' field will change to be the person who logged in (and I believe the same should happen when creatng items. As the post suggests... Can you share more about your use case? Are you using powe automate (aka flow) to create the new item in SP list instead of doing it directly in power app?
Hope this helps


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Dual Super User III
Dual Super User III

Re: Flow not populating created by correctly

This is by design, but you can have the Flow change the Created By field using an HTTP REST call to whatever account you want it to be.  This post talks about how to do it with Modified By, but Created by will be the same,

http://johnliu.net/blog/2019/2/flowninja-hack-78-modifying-modified-by-and-modified-time-with-micros...



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Flow not populating created by correctly

You're kidding me right?? This is way too complicated. All I'm trying to do is get the contact info of the person that CREATED the item in the SharePoint list. There isn't any modifying. Just create item in list and flow is triggered. Flow should "SEE" who created the item as the person that was logged in and filled out the PowerApps form.

 

Help!!!!!!!???!!!!!!!

 

 

Highlighted
Dual Super User III
Dual Super User III

Re: Flow not populating created by correctly

Can you post a copy of your Flow?  If you are using the When an item is created trigger I have seen a problem with the timing involved not filling in the created By field right away.  You can also use the Modified By field.  When an item is created it sets both Created By and Modified by to the person who creates the item.  

 

I thought you were saying that you were creating the item using the Flow. Since the Flow is running in the context of the person who created the Flow that will normally result in a List Item where that person is the Created By. My answer is the only way to fix that issue. Are you just having trouble retrieving the Created By field from the trigger or could you be more specific about the problem.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Flow not populating created by correctly

The PowerApp form is for ONBOARDING. My flow is triggered by "When an item is created" in my SharePoint list. I then update the list to populate the account name and email address fields. Lastly, I email the contents of the list to a recipient.

 

How can I post a copy of the flow? You mean high level screen shot like below??

flow.PNG

Highlighted
Dual Super User III
Dual Super User III

Re: Flow not populating created by correctly

The person who created the item should be available in the Trigger dynamic properties.  The Update Item will change the Modified By field to the Maker of the Flow, but won't change the Created By.  Sometimes the trigger doesn't record the Created By in time to include it in the trigger.  When an item is Created you can also use the Modified By field from the Trigger.  That seems to populate more quickly in the trigger.  When an item is created it will be the same user.  

 

Again, if the user is creating the item in a list and that is triggering the Flow then the Created By and Modified By in the trigger should be the user who created the item.  Can you be a bit more specific about your problem?  When Power Apps creates an item it will set Created By to the user running the Power App.  When Flow creates an Item it will set Created By to the user who created the Flow.  That is the way its designed to work.  Are you saying that is not what you are seeing?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Flow not populating created by correctly

Thank you for your explanation. Seems logical.

 

User goes to PowerApps form >> Fills out form >> Save >> List item created >> Flow gets triggered

 

When I put the "Created By DisplayName" [from "When an item is created" section in dynamic content] in the email the GENERIC SERVICE ACCOUNT display name shows up. Same happens for Modified DisplayName. So sad.

 

Is there a way to see what the Created By fields are by just looking at the list.

Highlighted
Dual Super User III
Dual Super User III

Re: Flow not populating created by correctly

If the user is creating the list item directly from a Power Apps form, without the use of Power Automate, that is not the normal behavior.  Items created in Power Apps should be created using the identity of the user running the Power App, not the system account, even if the system account was the original creator of the Power App.  Is the Power App embedded in a page? That might account for the connections being done in the context of the system.  But that's not the way a normal Power App or a SharePoint Integrated Power App will work.

 

So the issue here isn't how to change the Created By.  The issue is something about the way the Power App is being used to create the new item.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Flow not populating created by correctly

Yah, I think that is just it. PowerApps is populating the Created By field by the SharePoint Integration account in PowerApps. This is a real bummer. I need to capture the person's account that is filling out the form.

Highlighted
Dual Super User III
Dual Super User III

Re: Flow not populating created by correctly

But that's my point.  I just checked again on one of my SharePoint Integrated forms.  The item in the list shows Created by as the user who filled out and saved the form. If yours is showing as a system account then there is something off about your SharePoint Integrated form. Its not supposed to work that way.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Flow not populating created by correctly

Thank you for checking. I signed in as another user and submitted the PowerApps form and it DOES SHOW THAT USER as the created by. So it is working but for some reason, my account still is pointing to the generic. Maybe because I initially created the PowerApps form under my account and then changed the connection/integration to the generic account.

 

I think we are good to go.

 

Thank you again kind sir

Highlighted
Dual Super User III
Dual Super User III

Re: Flow not populating created by correctly

Yes, If you created the original connection using a generic account then that is the connection tied to your account. But when other people use the App they will be prompted to create their own connections and those will be under their account.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (7,076)