Wednesday, 3 July 2024

Power pages - Authentication/Sign-In Dynamics 365

 

In this blog post let us go through how we can enable Authentication and Authorization to the Power Pages site and its data

Once the Power Pages site is built then we need to control access to both data and pages to the users. Power Pages is using the Microsoft Dataverse Contact table in the backend to authenticate site users

Power Pages OOOTB Sign-in

  • Navigate to the Power Pages site
  • Click on the “Sign-in” link

You will be able to see the below screen which will have 3 different tabs

  1. Sign-in
  2. Register
  3. Redeem Invitation
A picture shows the Sign-in page with different options

Sign-in

Sign in option allows the users to sign into your Power Pages site if they have registered already either as a local user or as an External Sign in (Azure AD).

Users can just enter the username and password to log in if they have registered as local users. If they are Dynamics 365 users (i.e., Azure Ad users) and they have registered already then, they can log in by just clicking the “Azure AD” button.

Note: Even though users are part of dynamics 365, to login to the Power Pages site they must register separately to login by using the “Azure AD” button

A picture shows local login and Azure AD sign in methods

How to Register

A picture is shown on “How to register”

Once users register with the details then they will get stored in the Microsoft “Contact” table. You can see them either by going to the “Contact” table from the Power Pages “Data” tab or Power Apps Portal Management’s “Contacts” tab under the Security section

A picture shows how to navigate and see the Dataverse “contact” table data

Redeem Invitation

The other option to enable/activate the user account for Power Page is by sending the Invitation to the user’s email address.

As an admin, you can do this by using the Power Apps Portal management app

  • Navigate to the Power Apps Portal management
  • Click on “Invitation” under the Security tab
  • Click on “+ New”
  • Type name of the user
  • Select whether the invitation is to invite a user or a group
  • Set the invitation expiration date
  • Select the contact from the “Inviter” tab or create a contact record and then Save
  • To send the invitation click on “Flow” and the “Send Invitation”
  • Once the invitation is sent the user can copy the code
  • Copied code can be put into the “Invitation Code” section under the “Redeem Invitation” tab
  • Click “register” to register and login to the website
A picture shows about the Invitation setup
A picture shows – how to send the invitation
A picture shows how to redeem the generated code

Point to keep in mind

Microsoft recommends that you use the Azure Active Directory B2C (Azure AD B2C) identity provider for authentication and deprecate the local identity provider for your portal

In the next episode let us see how the Permission model is defined in Power Pages.

Happy learning !!!

No comments:

Post a Comment

Power Apps Drag & Drop Kanban code sample

  Introduction: The Kanban Board App Developers at a software company use the Kanban board to show their progress on development tasks and b...