i have been assigned to create a customer portal and my initial task to build a login page for the contact to access customer portal used the Contact dataverse entity Fields :
1) Email - Mandatory Field.
2) Password - used masked option to store their login password
When the user enters the login and password they should be allowed to access the portal.
If Login fails, show the error message "Enter correct login and password to access" and stay on the login page.
i have used custom layout by using HTML and liquid code to create a login page, now i am facing two kind of issues :
1) In built sign in page has broken and link is redirecting to some other URL and getting error as : HTTP 401 issue.
2) In Custom portal Login Page, if i try to sign in either valid or invalid credential nothing happens neither i get success or error message.
Hi there! Good morning, evening, or afternoon - depending on where you are :) Hope you are well today!
Issue 1: Built-in sign-in page redirecting with HTTP 401 error
This error typically occurs due to authentication misconfigurations. Please check the following:
Authentication Settings:
Navigate to Portal Management App > Site Settings. Ensure the Authentication/OpenIdConnect/[Provider] or Authentication/Registration settings are configured correctly.
Verify the redirect URL matches what’s configured in your Azure AD or any external identity provider.
Web Roles:
Ensure that the contact trying to log in is associated with the correct Web Role granting access permissions.
Power Pages Cache Refresh:
Clear the cache by navigating to Portal Actions in the Portal Management App and selecting “Clear Cache.”
Alternatively, append ?portalcacheclear=true to the portal URL for a one-time cache refresh.
Issue 2: Custom login page not responding (no success or error message)
This sounds like an issue with how the Liquid/HTML code interacts with the underlying authentication logic. Steps to resolve:
Validation Logic:
Double-check that your Liquid and JavaScript code properly handle input validation and redirect users based on the login status. For example:
Use the sign in entity form metadata for authentication.
Provide error message handling with Liquid like:
liquid
Dataverse Entity Permissions:
Ensure that the Contact entity permissions in the portal are properly set up.
Grant Create, Read, and Append permissions to the appropriate Web Role.
Error Handling Feedback:
Test for front-end issues by inspecting the browser console for errors using Developer Tools (F12). Debug any failures in script execution.
Redirect Logic:
Verify that the custom HTML page has proper actions defined for successful and failed logins. For example:
Additional Recommendations:
Fiddler or Postman Testing: Simulate the login process to analyze the network responses and identify potential back-end errors.
Portal Diagnostics: Use the Power Pages diagnostics tool to review authentication-related logs.
Revert and Rebuild: If the issues persist, consider temporarily restoring the built-in login page and reapplying your customizations in a controlled environment.
Was this reply helpful?YesNo
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.