web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Pages - Customize & Extend
Suggested answer

Unable to implement the custom login and registration page in power pages

(1) ShareShare
ReportReport
Posted on by 24
Hello,

I am working on the project where I need to create custom login, registration and profile page for local authentication in power pages. 



Login:



Registration:



I have used power pages web api and power automate flow to create new user and storing values in contact entity. But I don't know how to extend custom logic and profile page functionality and manage user session for custom pages in power pages. I am trying to use the below code but it is not working. Local sign in is already enabled but it is showing "_services/auth/login/local" page not found error when testing with portal URL.

I notice that we can't integrate custom HTML directly to existing login and registration pages in power pages.



Could you please help me on this?

Thanks
Pradip
Categories:
I have the same question (0)
  • Pradip Raj Profile Picture
    24 on at
    Unable to implement the custom login and registration page in power pages
    Thank you @DP_Gunta @Jon Unzueta for your information. I need to update the page design so will try the suggestions to update the login and registration pages.
  • DP_Prabh Profile Picture
    21 on at
    Unable to implement the custom login and registration page in power pages
    Handling custom login/registration/profile pages for local authentication in Power Pages is quite nuanced, and there are some platform restrictions to be aware of. Following are the ways how you can customize the login/registration page:
    Option 1: Customize Existing OOB Login and Registration Pages
    You can extend the out-of-the-box login, registration, and profile pages using Web Templates, JavaScript, and Liquid (within supported boundaries).
    Steps:
    • Go to Portal Management App.
    • Locate the Web Page called "Login" or "Register".
    • Find the associated Web Template.
    • You can extend the logic using Liquid, and inject JS to modify the UI.
    • For styling or additional UI elements, use custom CSS or JS, but you can't modify the form submission behavior itself.
    🛑 You cannot change the action URL (e.g., posting to /_services/auth/login/local) — that’s handled internally.
    Option 2: Use External Identity Provider (if full customization is required)
    • If you're looking for complete control over the UI and authentication flow, consider using Azure AD B2C (MSAL package) in react or another OIDC-compliant provider. This lets you:
      • Design fully custom login/registration UIs outside Power Pages.
      • Handle authentication externally.
      • Redirect users back to Power Pages with a token (via OpenID Connect).
    Option 3:  Create Custom Registration and Profile Pages (Only)
    • This is supported to some extent — here's how:
       For Custom Registration Page. You can use:
    • A custom form connected to the Contact table, with anonymous access.
    • Power Automate flow triggered on form submission (or directly via Web API).
    • Ensure appropriate table permissions for anonymous users.
    • But you cannot directly "sign in" the user after registration without using the OOB login form.
    For Profile Page:
    • Once the user is authenticated:
    • You can use Web API to load/update Contact data.
    • Use Liquid + JavaScript to display and edit fields.
    • Add your custom logic using JS/Power Automate/Web API.
    Managing User Sessions (Authenticated Experience)
    • Once a user is authenticated via the platform:
    • Use the user object in Liquid:
    • liquid
    {% if user %}
      Hello {{ user.fullname }}
    {% endif %}
    • Use JavaScript + Web API to get/set contact values for the current user.
    • For Web API, ensure proper table permissions for the authenticated web role.

      To invite new users, you can configure a Power Automate flow that triggers when a new record is created in the Contact table. Within the flow, you can generate a custom invitation code, create a corresponding record in the Invitation table, and send an email notification to the newly registered user. The email should include the invite code along with the link to your Power Pages site.

      Hope this helps!

      Thanks.

  • Suggested answer
    Jon Unzueta Profile Picture
    1,215 Super User 2025 Season 2 on at
    Unable to implement the custom login and registration page in power pages
     
     

    1. Enable Local Authentication

    Make sure these site settings are correctly configured in the Portal Management App:

    Site Setting Value
    Authentication/Registration/Enabled true
    Authentication/Registration/LocalLoginEnabled true
    Authentication/Registration/OpenRegistrationEnabled true
    Authentication/Registration/ResetPasswordEnabled true
     

    You can find these under Site Settings in the Portal Management App.


    2. Use Built-in Pages with Custom Styling

    Instead of building login/registration from scratch, use the built-in pages and customize them via CSS and Liquid. You can:

    • Add custom branding.
    • Hide/show fields conditionally.
    • Use Web Templates and Content Snippets to inject HTML.

    3. Custom Registration via Web API + Power Automate

    You're already creating users via Web API and storing them in the Contact table. That’s great! To complete the flow:

    • Generate an invitation code for the contact.
    • Send a link to the user like:

      https://yourportal.powerappsportals.com/register/?invitation=CODE

    • This allows the user to complete registration and be linked to the correct contact record.

    4. Custom Profile Page

    You can create a custom profile page using a model-driven form on the Contact table. Steps:

    • Create a form in Dataverse for the Contact entity.
    • Add it to a Power Pages page using the Form component.
    • Use Liquid to restrict access to authenticated users:
    •  

    {% if user %}

    {% else %}

    Please log in to view your profile.

    {% endif %}

     

    🏷️ Tag me if you have any further questions or if the issue persists. ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems. ❤️ Give it a Like if you found the approach useful in any way.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#2
Lucas001 Profile Picture

Lucas001 48 Super User 2025 Season 2

#3
KevinGador Profile Picture

KevinGador 44 Super User 2025 Season 2

Featured topics