web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Microsoft Flow - Imper...
Power Automate
Unanswered

Microsoft Flow - Impersonate User while uploading file to sharepoint

(1) ShareShare
ReportReport
Posted on by 18

Hi,

 

I am uploading files to the SharePoint using Microsoft Flow. The 'Created By' column in SharePoint Document Library shows the name of the System Account which is being used to connect MS Flow to the SharePoint.

 

I wish to show the name of the actual user, who has uploaded the file. I have the email ID of the user who has uploaded the file. 

 

Is there a way through which i can resolve the User object corresponding to the email ID and set it in the created by field in sharepoint? Also, is there a way to impersonate as a particular user while uploading the file?

 

Regards,

Namit

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @namit_gupta,

     

    Do you want to change the value of the Created field of the SharePoint Document Library to the person who actually uploaded the file, rather than the connection account of the configuration of the Flow that uploaded the file?

    I tried using the Send Http request to SharePoint action to change this property via the Post method, but when I proceeded to configure the Request Body, I found no way to get the specific information of the Created property.

    In general, the Created property contains the following, but there is no way to indicate in the Request body that the property needs to be changed:

    16.PNG

    This is my attempts, it can change some other properties, but there seems to be no way to change Created:

    17.PNG

    <?xml version="1.0" encoding="utf-8"?>
    <entry xml:base="https://beatrng.sharepoint.com/sites/tes/_api/"
     xmlns="http://www.w3.org/2005/Atom"
     xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
     xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
     xmlns:georss="http://www.georss.org/georss"
     xmlns:gml="http://www.opengis.net/gml" m:etag="&quot;22&quot;">
     <id>4d64755d-e7b0-4ab6-8f88-27c9e84c0014</id>
     <category term="SP.Data.TRONItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
     <link rel="edit" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/FirstUniqueAncestorSecurableObject" type="application/atom+xml;type=entry" title="FirstUniqueAncestorSecurableObject" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/FirstUniqueAncestorSecurableObject" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/RoleAssignments" type="application/atom+xml;type=feed" title="RoleAssignments" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/RoleAssignments" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/AttachmentFiles" type="application/atom+xml;type=feed" title="AttachmentFiles" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/AttachmentFiles" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ContentType" type="application/atom+xml;type=entry" title="ContentType" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/ContentType" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/GetDlpPolicyTip" type="application/atom+xml;type=entry" title="GetDlpPolicyTip" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/GetDlpPolicyTip" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/FieldValuesAsHtml" type="application/atom+xml;type=entry" title="FieldValuesAsHtml" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/FieldValuesAsHtml" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/FieldValuesAsText" type="application/atom+xml;type=entry" title="FieldValuesAsText" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/FieldValuesAsText" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/FieldValuesForEdit" type="application/atom+xml;type=entry" title="FieldValuesForEdit" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/FieldValuesForEdit" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/File" type="application/atom+xml;type=entry" title="File" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/File" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Folder" type="application/atom+xml;type=entry" title="Folder" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/Folder" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/LikedByInformation" type="application/atom+xml;type=entry" title="LikedByInformation" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/LikedByInformation" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ParentList" type="application/atom+xml;type=entry" title="ParentList" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/ParentList" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Properties" type="application/atom+xml;type=entry" title="Properties" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/Properties" />
     <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Versions" type="application/atom+xml;type=feed" title="Versions" href="Web/Lists(guid'70d3b5ce-6dfd-4a24-8dd0-d417ccc97754')/Items(1)/Versions" />
     <title />
     <updated>2018-10-23T07:24:14Z</updated>
     <author>
     <name />
     </author>
     <content type="application/xml">
     <m:properties>
     <d:FileSystemObjectType m:type="Edm.Int32">0</d:FileSystemObjectType>
     <d:Id m:type="Edm.Int32">1</d:Id>
     <d:ServerRedirectedEmbedUri m:null="true" />
     <d:ServerRedirectedEmbedUrl></d:ServerRedirectedEmbedUrl>
     <d:ID m:type="Edm.Int32">1</d:ID>
     <d:ContentTypeId>0x010100F814846D7396F241BD1A1A9D7D082531</d:ContentTypeId>
     <d:Created m:type="Edm.DateTime">2018-10-23T05:39:40Z</d:Created>
     <d:AuthorId m:type="Edm.Int32">6</d:AuthorId>
     <d:Modified m:type="Edm.DateTime">2018-10-23T06:46:32Z</d:Modified>
     <d:EditorId m:type="Edm.Int32">6</d:EditorId>
     <d:OData__CopySource m:null="true" />
     <d:CheckoutUserId m:null="true" />
     <d:OData__UIVersionString>22.0</d:OData__UIVersionString>
     <d:GUID m:type="Edm.Guid">55383cde-f7b3-48be-aa8e-0589f67e0fb9</d:GUID>
     <d:ComplianceAssetId m:null="true" />
     <d:Title>TestUpdated</d:Title>
     </m:properties>
     </content>
    </entry>

    Properties does not seem to contain the relevant content of Created.

    Some links that can be referenced:

    managed-metadata-fields

    update-list-item-in-sp-2013-using-rest

    working-with-lists-and-list-items-with-rest

    working-with-folders-and-files-with-rest

     

    I am afraid there is no suitable way to change the value of this field through Flow.

    Besides, please consider submit this as an idea in the Microsoft Flow idea forum, so it might be considered for future releases.

    https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

     

    Best Regards,

    Barry

  • GabrielStJohn Profile Picture
    Microsoft Employee on at

    Hey, @namit_gupta!

    Thank you for posting on the Flow Community Forum! It appears as though @v-bacao-msft would like some more information in order to further assist you properly with your issue. Please share any additional information that was requested in order to decrease the amount of time that it will take for you to be assisted!

    Thank you for being an active member of the Flow Community!

    -Gabriel
    Flow Community Manager

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 671

#3
Haque Profile Picture

Haque 551

Last 30 days Overall leaderboard