A login screen acts as a barrier between the content of your application and unauthorized users.
with the help of logging screen, you can have control on access and sensitive information and maintain integrity of application by making users to authenticate them.
Let’s get started with creating a login screen in PowerApps.
Step 1: Create a New App
Log in to PowerApps and navigate to the 'Apps' section.
Click on 'Create an app' and choose the 'Canvas app from blank' option.
Step 2: Design the User Interface
Once the new app is created, you can open the app using PowerApps Studio.
Design the login screen interface by adding two input fields for ‘Email id and ‘Password along with a ‘Login’ and ‘Register’ buttons.
You can add two text labels to text input boxes as shown in below screen.
Step 3: Connect to Data Source
Go to the ‘View’ tab and click on ‘Data sources’ à Add data and search for SharePoint, then click on Add a connection as shown in below screens.
Once connection is added you can able to find data source.
Step 4: Validate User Credentials
Double-click on the ‘Login’ button to open the formula bar.
Use the Lookup function to check if the entered username and password exist in your data source. The formula might look like:
If(!IsBlank(LookUp(EmployeeList, Email= TextInput1.Text And Password=TextInput2.Text).Title),Navigate(View_Screen_1),Navigate(Failed_Screen));
Reset(TextInput1);
Reset(TextInput2);
Step 5: Handle Navigation
If the credentials are valid, navigate user to your app main screen else navigate user to error scree.
Login error screen :
Login successfully:
Step 9: Publish and Share
Once testing is complete, publish your app.
Hope this article help!