Hello @Sakthi , thanks for your questions. Follows my answers for them:
- I understand that
forceChangePasswordNextSignIn
will be set to true, when admin resets the password. Can we read thisforceChangePasswordNextSignIn
attribute using custom policy within the userJourney?
Yes it can, just add an OutputClaim element in the proper technical profile. Ie.AAD-UserReadUsingAlternativeSecurityId
for social logins. - We get an exception in the
login-NonInteractive
validation technical profile, is there anyway to track and handle the exception within the custom policy?
Yes, just intercept the AJAX request and inspect the response JSON paylod. Look forerrorCode AADB2C90263
andstatus 400
and act accordingly. Follows a basic sample:
$(document).on("ajaxSuccess", function (event, xhr, settings, data) {
const { status, errorCode } = data;
if (status === "400" && errorCode === "AADB2C90263") {
// TODO: do something
}
});
Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.