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 / get current Sharepoint...
Power Automate
Unanswered

get current Sharepoint user

(0) ShareShare
ReportReport
Posted on by 2

I need to track SharePoint users who access a document. I have a flow that will receive an HTTP request, open the document from the library, and create an item in a SP list showing when the link was clicked. I want to automatically populate the list with the user who is currently logged into SP and clicked the link. I have tried various methods and they all return me, as the owner of the flow. How do I capture the logged-in SP user and incorporate into my flow?  I have found some info that says in SP Online the current user can be found in "_spPageContextInfo.userLoginName" but I am unsure as to how to use this in my flow. Can it be accessed through the JSON schema in "When a HTTP Request is received?  I'm fairly new to Power Automate and struggling to change over from SharePoint Designer.  Thanks!

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at

    Hi @Jerry_Cobbs 

    Unfortunately, you can't do that with Power Automate.

    On the other hand, you can use Power Automate to query the Office 365 Management Activity API which stores the information you need (who opened a file, who downloaded it, who visit a page, etc...).

    You can read an excellent article on how to do that here: Office 365 Management Activity API with Power Automate - Part Three - Leon Armston's Blog

    Hope it helps!

    Ferran

     

     

  • rrovira Profile Picture
    Microsoft Employee on at

    Hello, @Jerry_Cobbs

     

    Yes, as far as I know there's no way to check if a person has open the file (and not modified it). The solution I would recommend you is to use PowerApps to see what users are requesting the documents in the library. However, I'm not sure how you could extract the current user using "_spPageContextInfo.userLoginName". Perhaps another member of the communities could help you with that! 

     

    I'll leave here a similar post with some answers that could guide you through that process: https://powerusers.microsoft.com/t5/Building-Flows/Check-if-a-File-is-opened-in-SharePoint-Document-Library/td-p/530675

     

    Cheers,

    Rodrigo

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard