1

During an external Pen-Test, it was observed that the login screen's password field for our SaaS product should be using AutoComplete="off".

We are using Azure AD B2C non-social accounts and custom policies; It is my understanding that the B2C mechanism injects its own content as a form into the div of the supplied template. Is it possible to influence the placement of this attribute? Customize the user interface with HTML templates in Azure Active Directory B2C

<!DOCTYPE html>
<html>
<head>
   <title>My Product Brand Name</title>
</head>
<body>
    <div id="api"> [[ INSERTED HERE ]] </div>
</body>
</html>

I have found references to modify the fields using client-side JavaScript, such as Azure B2C password field text and placeholder and Azure B2C Password field value visible button? but would prefer to avoid manipulating the DOM like this.

Note: I am aware that the guidance of AutoComplete="off" is that many of the browsers ignore the setting anyway, but I'm looking for an affirmative code change for compliance or a clear mitigation rationale.

Ray Hayes
  • 14,896
  • 8
  • 53
  • 78

1 Answers1

1

The only way to adjust the attribute is using client side JS. As you mention, it hardly works, browsers try very hard to auto populate regardless.

https://learn.microsoft.com/en-us/azure/active-directory-b2c/javascript-and-page-layout?pivots=b2c-custom-policy

Jas Suri - MSFT
  • 10,605
  • 2
  • 10
  • 20