How to Create Login page in PowerApps using SharePoint

A login screen acts as a barrier between the content of your application and unauthorized users. With the help of a logging screen, you can have control over access and sensitive information and maintain the integrity of the application by making users 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 ‘Login’ and ‘Register’ buttons.

You can add two text labels to text input boxes, as shown in the below screen.

Login page

Step 3. Connect to the 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 the below screens.

Data source

Sharepoint

Once the connection is added, you can able to find the data source.

Add data

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

Code

Step 5. Handle Navigation

If the credentials are valid, navigate the user to your app's main screen. Otherwise, navigate the user to the error screen.

Login error screen

Error

Login successfully

Login successfully

Step 6. Publish and Share

Once testing is complete, publish your app.

I hope this article helps!


Similar Articles