Question
How can a webform explicitly tell the browser or password manager which system a username and password are to be remembered for?
Context
I design an authentication system that offers multiple identity providers, and most of our users have accounts on more than one identity provider (IDP). These IDPs are on different subdomains (but I'd rather not limit answers to that, if possible). A username is only unique within an IDP, not across all IDPs.
This has led to some usability problems
The password manager may save a username and password as the primary domain (example.com) or inappropriate domains (subdomain1.example.com) instead of the appropriate secondary domain (subdomain4.example.com). This choice is then impossible to differentiate from other options sharing the same username.
It also leads to second-order usability problems described in How can I tell a password manager which username/password to use?.
The password manager may give options of which password to overwrite but suggest only one username and password out of many, and the wrong one at that, requiring the user to search through the password store for the matching one.
When a user changes their password, the password manager may overwrite the wrong password in its store.
Values saved by a password manager are related to field names. If each of these particular IdPs had a different password field name, then after one annoying hurdle (manually adding different password field values for differing IdPs), the single password manager entry would fill all the fields correctly leading to a simpler user experience.