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 Apps / Saving Login Credentia...
Power Apps
Unanswered

Saving Login Credentials for custom Login Page

(0) ShareShare
ReportReport
Posted on by 422

Hello All,

 

I have one requirement on my App , i want to save login details for the next login so that no need to enter the credentials again by user. 

SachinG31_0-1637125653192.png

On my login page user name is a combo box which pick data from SQL table ,user search for their name and chose it.

Password is a text box field.

I believe this should be possible by SaveData () function and collection , but how to achieve that i am not sure. if anyone knows any better approach than this please advise.

user use App in their phone , so last login details should be picked automatically.   

 

Categories:
  • Pablo Roldan Profile Picture
    316 on at

    Hi, Currently what you need is not supported(A Session Cookie) by MS Power Apps, you'll need to store that session in another SQL Table or Excel Sheet.

     

    By using SaveData and LoadData could do the trick but it's an Experimental feature:

    steps: 
    Turn it on

    PabloRoldan_0-1637165710696.png

     

    with your form like this set this formulas

    PabloRoldan_1-1637167027707.png

     

    PROPERTY:DEFAULT 
    CONTROL:TextInput User 
    ValueFormula:First(colSession).user
    
    PROPERTY:DEFAULT 
    CONTROL:TextInput Password
    ValueFormula:First(colSession).password
    
    PROPERTY:OnSelect
    CONTROL:Button Login
    ValueFormula:
    ClearCollect(colSession,{user:txt.Text,password:pwd.Text});
    SaveData(colSession,"SessionUser");
    
    PROPERTY:OnVisible
    CONTROL: YOUR_CURRENT_CREEN e.g:Screen1 
    ValueFormula:LoadData(colSession,"SessionUser")

     

    regards

  • SachinG31 Profile Picture
    422 on at

    Hello @PabloRoldan ,

     

    Thanks for looking into this issue , i applied your solution but its not working as expected. below are the findings.

    1.Runtime Error : Data cannot be saved when running in a web browser

    2. I did not find PROPERTY:OnVisible, on canvas app so i set the load data on property ONStart

    3.If we will not store this session details (username , Password ) somewhere at backend , after refreshing or killing the App it will again show the default username and no filled password. which is very frequent in my case

     

    Please mention your comment on this

  • Pablo Roldan Profile Picture
    316 on at

    Hi, regarding your issues:

    1.- your controls will have a horrorific red x. As is experimental in the editor mode is ok to be shown.

    2.- must set the value

    LoadData(colSession,"SessionUser")

    OnVisible of your Screen1, my bad I edited the last message.

    3.- Storing it in the backend could be a better choise in powerapps, The data saved with SaveData is not encrypted. But all depends on your architecture, requeriments, etc..

     

    regards.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard