Hi All,
I am new to power portals. I can see the site settings available to configure password policy rules for the registration process. I have tried that and it works fine with the registration form. Is there a way to use the same set of rules in any other forms?
How to consume the enforce password policy outside registration page. Please share your thoughts.
Is it possible to read the value configured for a specific site setting from the portal web page?
Thanks,
KJ
Hi @Jeyaram19,
You can access site settings in your Web Templates or Copy section of a Web Page (anywhere Liquid is honored) via the same methods shown in this documentation: https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects#settings
So, as an example, you would use
{% assign policyUppercase = settings['Authentication/UserManager/PasswordValidator/RequireUppercase'] %}
{% if policyUppercase %}
<!-- do something in liquid/pre-load... -->
{% endif %}
{% comment %}
Or, store the value and access in JS
{% endcomment %}
<input type="hidden" id="policyUppercase" value="{{ settings['Authentication/UserManager/PasswordValidator/RequireUppercase'] | boolean | default: false }}">
<script>
$(document).ready(function () {
window.policies = window.policies | {};
// store the value for uppercase policy in global variable..
window.policies.uppercase = $("#policyUppercase").val();
});
</script>
As far as implementing the policies from the settings, think of the settings as a dictionary and you can choose to use the values as you need to.
Lucas001
60
Super User 2025 Season 1
Fubar
55
Super User 2025 Season 1
surya narayanan
35