Revolutionize Your Student Project App Authentication with a PowerApps Login App Sample

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

seths10_0-1679609028659.png

Meet Seth Addo 

Meet Seth Addo, a Gold Microsoft Learn Student Ambassador and Computer Science student at the University of Cape Coast, Ghana. Seth has developed a fantastic PowerApps app sample for performing basic authentication in a Power Platform application. In this app, users can enter their login credentials, which are compared with a table containing usernames and passwords. If the entered credentials match, users are granted access to a protected area of the application. This approach can be extended with additional functionality like password reset and multi-factor authentication to enhance application security. Try the PowerApps Login app today for a simple and secure way to log into your applications.


Introduction

Hello everyone! My name is Seth Addo, a Computer Science student at the University of Cape Coast, Ghana. I am a Gold Microsoft Learn Student Ambassador. Today, I want to introduce you to a fantastic PowerApps app sample that I have developed and released to the Power Platform Community Samples. 

 

Introducing the PowerApps App Sample 

This is a sample approach to perform basic authentication in a Power Platform application that looks at a table containing usernames and passwords. This is perfect solution for enabling  most student with academic projects or hackathon challenges. 

Steps for the implementation:
 

 

1. Create a table in the Power Platform application to store the usernames and passwords. The table should have at least two columns, one for the username and another for the password. You can also add additional columns for storing other information, such as the user's role or security level. 

2. Create a screen in the application where users can enter their username and password. This screen should have two input fields, one for the username and another for the password. You can also add a "Sign In" button to submit the user's credentials. 

3. On the "Sign In" button, add an "OnSelect" action that looks up the user's credentials in the table. You can use the Power Platform's "LookUp" function to perform the lookup and compare the entered username and password with the values in the table. 

4. If the entered credentials match a record in the table, navigate the user to a "Home" screen or another protected area of the application. If the entered credentials do not match a record in the table, show an error message to the user indicating that their login was unsuccessful. 

5. For added security, you can hash the passwords on the table before storing them. You can also use a secure connection (such as SSL or TLS) to transmit the user's credentials between the application and the server. 

 

This is a basic approach to perform authentication in a Power Platform application using a table to store the usernames and passwords. You can build on this approach and add additional functionality, such as password reset, account lockouts, and multi-factor authentication, to enhance the security of the application. 

 

Note: Using the sample provided on Power Platform User Community Samples Page at pnp.github.io is a quick way of deploying this solution without having to do all configuration steps above :smile:

 

Why Use the PowerApps Login App 

The PowerApps Login app provides an easy and secure way to log into your applications. With this app, you can manage multiple logins and passwords in one place, reducing the risk of lost or forgotten login information. The app also provides a secure way to log into your applications, as it uses encryption to protect your passwords. This means that your information is always protected and safe. 

 

Technologies used 

To develop a viable solution, I used the following services: 

  • Sharepoint:  used for storing training request data and related files 
  • Canvas App: used to fill forms, view requests, and append requests 

 

The solution 

I created a Canvas app with the following capabilities: 

  • The ability to fill in the form  
  • The ability to sign into the application 
  • The ability to be rejected if you enter a wrong password 

 

Technical Overview 

1. Download the .msapp file in the solution folder from the PNP samples on GitHub 

Julia_Muiruri_0-1680161859424.png

 

2. Open PowerApps and select SharePoint 

Julia_Muiruri_2-1680162962505.png

 

3. Click Open and select the .msapp file you just downloaded

Julia_Muiruri_1-1680162844071.png

 

4. Preview the application 

seths10_7-1679609028674.png

 

 

NB: You can add your own data (SharePoint List) under the Data Tab. The list structure is in the readme of the GitHub page. 

 

Conclusion 

In conclusion, if you are looking for a simple and secure way to log into your applications, the PowerApps Login app is the solution for you. Whether you are an individual or an organization, this app provides an easy and secure way to manage your login information. Try it today and experience the benefits of PowerApps for yourself. 

To learn how to use this sample, check the readme here 


Developing a Robust Authentication Method for your Canvas Apps
Using Azure Active Directory (AAD) or OpenID in a Power Apps canvas app is a great way to authenticate users and ensure that only authorized individuals can access your application. Here's a high-level overview of how to use AAD or OpenID in your Power Apps canvas app as student you will need to have an Azure Active Directory AAD or OpenID. This does add additional level of complexity and another great reason to use the sample above for proof of concept applications. 

Process for using AAD or OpenID

  1. Register your app with AAD or OpenID: To use AAD or OpenID in your Power Apps canvas app, you must first register your app with the authentication provider. This process involves creating an application registration in the AAD or OpenID portal and obtaining a client ID and secret that your app can use to authenticate users.

  2. Add authentication to your app: Once you have registered your app with AAD or OpenID, you can add authentication to your Power Apps canvas app. This typically involves adding a connector to your app that can authenticate users using AAD or OpenID. There are several connectors available in Power Apps that can be used for authentication, such as the Office 365 Users connector or the AAD connector.

  3. Set up user authentication: Once you have added the authentication connector to your app, you can set up user authentication. This typically involves adding a sign-in screen to your app where users can enter their credentials, such as their username and password. You can also add multi-factor authentication to your app to further enhance security.

  4. Configure app permissions: Finally, you must configure app permissions to ensure that only authorized users can access certain parts of your app. This typically involves setting up role-based access control (RBAC) to determine which users can access which parts of your app. You can also use AAD groups to manage app permissions.

Overall, using AAD or OpenID in your Power Apps canvas app is a great way to ensure that only authorized users can access your application. By following these steps, you can create a secure and robust authentication system for your app.

 
Want to learn more about Canvas Power Apps 

These are excellent Microsoft Learn Modules to help get you started.

Get started with Power Apps canvas apps
Customize a canvas app in Power Apps
How to build the UI in a canvas app in Power Apps

Navigation in a canvas app in Power Apps

Manage apps in Power Apps
Build a mobile-optimized app from Power Apps

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.