Power Apps – Portals (Part 3)
Welcome back to our Power Apps series!!! This is the last blog of this series. If you haven’t visited our previous blogs, then please go through them.
Portals are new feature to Power Apps dealing with incredible functionality of sharing the app to the users outside the tenant. Power Apps Portals can build low-code apps and website which are responsive allowing the external users to access the app.
The Portals are created based on the Environment i.e. SharePoint Developers need to create an Environment and in that Portals are created. Environment is a storage space where organizations data, flows and apps are stored and managed. By default, every tenant has one environment created which is accessed by all users in tenant. Only one portal of each type can be created in an Environment.
Table of Content
Let’s create a Portal in which a user can logged-in using his/her LinkedIn account. But before proceeding, an environment creation is required for creating Portal.
Note: You can also create a Portal in the current environment you have logged in, if no other portal of same type exists.
- Login to Admin Center of PowerApps using the URL https://admin.powerapps.com.
- Under Environments, create new environment by clicking “+New environment” and adding the required details.
- Once the environment is created, it will ask for creating a database.
- After creating database, switch to new environment.
- Navigate to Power Apps platform using URL https://make.powerapps.com.
- Click on “Apps” on left navigation menu.
- Select Portal under “+ New app” option.
- Enter the Portal details and click on Create.
- While the app is provisioning, notifications will pop up on right side.
- After the app is provisioned, it will appear under Apps section.
- Edit the app as per your requirement.
Opening the Portal in Edit mode has the provision to change the default pages as per the requirement. This blog is not covering the ways you can edit the Portal.
- Clicking the Portal name will open the Portal. Below image is the example of the Portal.
- The interesting part of Portals is that we can allow the external users to access the app and can even view or add the data to Common Data Service. CDS explained in short is the storage space for Power Apps.
- Here the blog will proceed on how the users can login to Portals using their LinkedIn account.
Power Apps external Authenticate with LinkedIn
The first step is to create the Apps inside LinkedIn which will enable a button allowing the user to sign in using LinkedIn account into Portals.
- Navigate to http://developers.linkedin.com.
- Click on “Create App” button and insert the App details.
- Make sure the “Sign In with LinkedIn” option is checked.
- Click on Create App and app will be created.
- Click on the Auth tab and change the OAuth 2.0 settings.
- Add the Redirect URL under OAuth 2.0 settings.
- The URL of the Portals app created and append /signin-linkedin after it.
- Click on Update.
Now the next step is to connect this app to Power Apps Portal. Follow the below steps to connect it.
- Navigate to the Portal App created in Power Apps platform.
- Click on Settings option available on selecting the app.
- Navigate to Site Settings.
The page will open the Active Site Settings. We require to configure the LinkedIn settings by editing its Consumer Key and Consumer Secret.
- Add the Value field of the ConsumerKey to the value of Client ID of the app created in LinkedIn.
- Similarly add the Value field in ConsumerSecret to the value of Client Secret field of the app created in LinkedIn.
- This will add the LinkedIn button in the Sign-In page of the Portal. Sign-In page will open by clicking the “Sign in” option available in the header of Portal.
- Clicking on LinkedIn button will allow you to login with LinkedIn account and the profile will be displayed.
Through this blog, one gets an idea about creating a Power Apps Portal and provide it to an external user to play with their portal. One can also provide the access to their apps though this Portal. If there is a requirement to allow data access to any user in an appropriate form, then one can achieve through our Power Apps blog series.