I have created a PowerApps and now I want to login using SharePoint credentials.
I used this formula on onSelect of login button
If(LookUp('Account Name', Title = Username.Text, Password ) = Password, Navigate([@Screen1], ScreenTransition.Fade))
Here Account Name is my DataSource , Title and Password are columns in DataSource.
So how can i achieve this?
Let me see if I understand your question properly.
You have a SharePoint List of something like below.
list
And a login page like this
loginpage
on click on Signin button you want to verify Account and password exists in the list and let the user navigate to a welcome page.
Assuming the above scenario is what you want, the onSelect would look like this:
If((LookUp('list-test',AccountName = TextInput1.Text).Password = TextInput3.Text), Set(errorMessage, "");Navigate(Screen2,ScreenTransition.Fade), Set(errorMessage, "Wrong account name or password"))
In my example I have a label (label3) whose text is bound to that global variable errorMessage in case of error.