Managing external identities to enable secure access for partners, customers, and other non-employees
To keep the custom attribute off the sign-up page but still set it programmatically and have it available on the user object (and then in tokens), configure its hidden and editable flags via Microsoft Graph.
For external sign-up user flows, the attribute visibility is controlled by the authenticationAttributeCollectionInputConfiguration resource. The key flags are:
-
hidden:falseby default (attribute is shown on the sign-up page). Set totrueto hide it. -
editable:trueby default (user can edit it). Set totrueorfalsedepending on whether it should be user-editable if/when shown.
To achieve the scenario “not visible on sign-up, but set programmatically”:
- Set
hidden=true - Set
editable=true
This hides the attribute from the page while still allowing it to be set via Graph or a custom extension.
High-level steps using Microsoft Graph:
- Ensure the custom attribute is created in Microsoft Entra External ID and added to the user flow so it exists as an attribute in that flow.
- Use Microsoft Graph to update the user flow’s page layout configuration and set the flags for that attribute via the
authenticationAttributeCollectionInputConfigurationresource.- The documentation calls out this resource and points to an example on “updating the page layout of a self-service sign up user flow” that shows how to set
hiddenandeditablefor each attribute.
- The documentation calls out this resource and points to an example on “updating the page layout of a self-service sign up user flow” that shows how to set
- After the attribute is hidden and still editable programmatically, use Microsoft Graph to set its value on the user object (for example, via extension attributes as described for External ID) and configure the user flow/claims mapping so that this attribute is emitted in the ID token.
The key behavior from the documentation:
- To hide the attribute but still allow programmatic setting:
-
hidden = true -
editable = true
-
- This is configured using the
authenticationAttributeCollectionInputConfigurationresource on the user flow via Microsoft Graph.
Once configured, the attribute will not appear during sign-up, but applications can set it through Graph and then include it in tokens via the user flow’s claims configuration.
References: