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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Onedrive connector - f...
Power Automate
Unanswered

Onedrive connector - file creation date

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

I have problem with obtaining creation date of files on my OneDrive with OneDrive connector in Flow. GetFileMetadata returns BlobMetadata object which contains a lot of file properties (e.g. LastModified), but whenCreated attribute (or similar) is missing there. Please let me know if it is possible to get file creation date using OneDrive connector (or in other way).

https://docs.microsoft.com/pl-pl/connectors/onedriveconnector/#blobmetadata 

 

Thanks 🙂

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at

    Hi!

    I assume that the files in your OneDrive folder are modified after you created them within your OneDrive folder, right? If not, you can relay on 'last modified time'.

    I mean, according to this post from april 2018the creation date time could not be accesed via Power Automate, only last modified date time..

    https://powerusers.microsoft.com/t5/Using-Flows/Delete-files-from-folder-after-180-days/td-p/110555

     

    If your files can be modified, I can only think of having a flow that triggers when file is created, adds a tag with the creation date, but I must confess it sounds weird as a workaround.

    Let's hope somebody else can point us to a more reasonable workaround.

     

    Hope this helps

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    I was surprised to find that if you go look at the files in OneDrive for Business itself, the Created and Created By fields are not included in the properties for the file.  I think this is a deeper problem than the connector.  I think OneDrive doesn't actually maintain the Creation attributes because the assumption is that the owner of the OneDrive created the file.  The only way I can think of to get around this would be to use HTTP to do a REST call to get the first version of the file and use the modified attribute from that as the created data.

  • efialttes Profile Picture
    14,756 on at

    @Pstork1 

    Can you elaborate a bit more the your suggestion to "use HTTP to do a REST call to get the first version of the file and use the modified attribute from that as the created data"? You mean deploying a custom connector to onedrive? AS far as I remember there is a "Send HTTP request to Sharepoint" but there is no "Send HTTP request to OneDrive" yet

    Thanx!

  • PawelN Profile Picture
    4 on at

    Hi, thanks for help! I re-checked my case again and probably LastModified will do the job. But I'm still really surprised that such basic attribute of file is not available...

  • efialttes Profile Picture
    14,756 on at

    @PawelN 

    Yeah, it was surprising also for me... and this limitation seems to apply also to OneDrive For Business, which is also weird. I mean if you store files in Sharepoint, Created date time related info is available

    Glad to see Last Modified can be a valid workaround for your scenario

    Hope this helps

     

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    I haven't tried it, so I can't guarantee that it would work, but a couple of points to make.

     

    1) OneDrive for Business is still a SharePoint site collection.  Yes it has been customized, but tends to have the same endpoints behind the scenes.  So I think using a REST call to get a list of versions will work.

    2) There is a generic HTTP action in Power Automate also.  Behind the scenes it does the same thing the SharePoint HTTP action does.  The SharePoint one has been tailored for SharePoint and is standard instead of premium.  But you can make HTTP calls in Power Automate without building a custom connector.

     

    Having said that.  I don't know that it will work, but it is one avenue of exploration.  Here's the documentation on the actual REST call to get versions. https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/listitemversion_get?view=odsp-graph-online 

     

    But the biggest question is whether OneDrive actually retains the creation info or not.  As I said, its built on SharePoint as a base, so I would assume its there.  But it might not be retrievable.  An interesting project to play with in my copious free-time while under lockdown.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard