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 / How do i save the user...
Power Automate
Unanswered

How do i save the user details in sharepoint who has logged in power apps through power automate

(0) ShareShare
ReportReport
Posted on by 403

Hi . I have a question that sounds like complicated.

Let me explain.

First off, I have created a login page in power apps which contains username and password (That's page 1 in that application)

Secondly, The username and password is saved in a SharePoint list which is used to authenticate username and password. 

So after the user logins , it will navigate to second page. and in second page, i want that user name to be displayed in top right corner.

In power apps, i have wrote a code to display user details

let me show the code below

--------------------------------------------------------------------------------------------------------------------

If( !IsBlank( LookUp( logindatabase, Title = Usernametxt.Text && Password = Passwordtxt.Text ).Password ), Navigate(Content_Generation),Reset(Usernametxt);Reset(Passwordtxt));
Set(varUserRecord, {});
Set(varUserRecord, LookUp(logindatabase, Title=Usernametxt.Text && Password=Passwordtxt.Text));
If(IsBlank(varUserRecord.ID),
Notify("Invalid username or password", NotificationType.Error, 3000),
Notify("Successful Login", NotificationType.Success, 3000);Navigate(Content_Generation, None)
)

--------------------------------------------------------------------------------------------------------------

So in next page, whenever user logins , i can display their name in top right corner 

"Welcome User " & varUserRecord.Title & "!"

----------------------------------------------------------------------------------------------------------------

Is it possible to do the same in power automate?

also, using power automate, i have to save the username in sharepoint, who has logged in. 

so how to do this process?

pls guide me in detail how to do that.

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,484 on at

    Hey @Jupyter123 

     

    Yes its possible to do the same in Power Automate.

     

    So, whenever a person clicks on login button, you should run the flow.

     

    From that button, also send the username and password.

    Then with the help of condition action, check if username and password is correct or not.

    If it is correct, send something to the power app, by which if it matches, it would take the user to the next screen. And also at this point store, the username of the person, to maintain who has logged in power apps.

     

    If they do not match, send something to the power apps, that will not let the power app to go to the next screen, and shows a message username or password incorrect.

     

    You should probably return 1 and 0.

    If the returned value is 1, everything matches and you should take the user to next screen.

    If the returned value is 0, username/password did not match and you should show a message that, something didnt match.

     

    This is how your flow would look like:

     

    Sundeep_Malik_0-1668507204645.png

     

    I have added a variable, which will note that username and password matched or not. It will act like a flag variable like other programming languages.

     

    Sundeep_Malik_2-1668507389441.png

     

     

    Used get items to get username and password. If the flow runs really slow, then you will have to use filter query.

     

    After that use a condition action and use username coming from power apps and username coming from get items, this will create an apply to each.

    If the username didnt match, set the variable to 0.

    Sundeep_Malik_1-1668507372470.png

    If the username matches, add another condition action, to match the password.

    If the password doesnt match, set variable to 0.

    If the password matches, set variable to 1 and use create item, to make an entry for the user logged in.

    Sundeep_Malik_3-1668507553541.png

     

    At the end just add respond to power apps action and pass the match variable in it.

     

    Sundeep_Malik_4-1668507593685.png

     

    I hope this will help.

     

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 86 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 55

#3
Ellis Karim Profile Picture

Ellis Karim 53 Super User 2026 Season 1

Last 30 days Overall leaderboard