cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Retrive properties of a user

I was wondering if there is a way in which we can retrieve name of the user logged in to the SharePoint Site, store it in an array or a variable and use it later in Send an email action. 

 

1 ACCEPTED SOLUTION

Accepted Solutions

As was already mentioned.  Flows that run off automated triggers run in the context of the user who created them.  So any attempt to get the logged in user that way would return your own user. Using the trigger you are using you could retrieve the email address (UPN) of the person who modified the item.  Their display name is also available.

 

Also, the get my profile properties action you are using will try to retrieve the user properties of the maker of the flow.



-------------------------------------------------------------------------
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

9 REPLIES 9
Dual Super User III
Dual Super User III

This is possible in the context of a Power App, but unless a Flow is started from a Power App button the flow will run in the context of the user who created the flow.  In that case it is the original maker who is logging into the SharePoint site to process things and there is no user login. 

 

One other case is possible. If you are using a trigger that is related to a user's action, like modifying a file, then you could also get the name of the user who modified the file or item.



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

How can I get the username if I use Power App for triggering the flow?

Super User III
Super User III

@flowuser-21 

Not sure I understood the scenario.

If you are looking for the user that has created an item in a SP list, or has modified it, just need to get its ID or even its email address by checking Created/Modified object metadata column value. If you need extra info you can use Office 365 users connector

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!



The user who is logged into the system basically fills a SP Form. There is a flow which collects the data from the form, formats it and then uses send an email action in which the data collected is appended into the email body. 

All I need is the name of the person who is logged in and is filling the form because the same person will later submit the form which will trigger a send an email action in the background where I need to add his/her name in the Email body.

The name of the user running the Power App will be available as 

User().FullName

inside the Power App.  You can pass that as a parameter to the Flow using the Run() command in Power apps and then store it in a variable. 



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

Hi @flowuser-21 ,

 

Your requirement to retrieve name of the user logged in to the SharePoint Site is not supported in microsoft flow currently.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This is what I tried but there seems to be some error. user_fetch.PNG

As was already mentioned.  Flows that run off automated triggers run in the context of the user who created them.  So any attempt to get the logged in user that way would return your own user. Using the trigger you are using you could retrieve the email address (UPN) of the person who modified the item.  Their display name is also available.

 

Also, the get my profile properties action you are using will try to retrieve the user properties of the maker of the flow.



-------------------------------------------------------------------------
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

Thanks. It worked properly!!

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (8,143)