I am a using B2C MSAL Browser.js
I have a working sign up sign in flow however when I want to pass a extraQueryParameter to the sign up page it get's cleared after the user hit's the sign up button.
const request = {
scopes: [process.env.id],
extraQueryParameters: { id: "123" },
};
msalInstance.loginRedirect(request);
I can see at the login the the query parameter get's added but when I hit sign up it get's removed, is there a way to pass it to the sign up, or hit the sign up page directly without having to create separate user flows?
Note: You have to use custom policies.
To amplify what @JasSuri said:
The parameter is in the query string
At the end of the authentication request, you could have:
....&id=123
In the technical profile for sign up, add:
<Item Key="IncludeClaimResolvingInClaimsHandling">true</Item>
to the metadata.
Assume "queryID" is a textbox on the sign-up page.
Then have an input claim in your sign up:
<InputClaim ClaimTypeReferenceId="queryID" DefaultValue="{OAUTH-KV:id}" AlwaysUseDefaultValue="true"/>
You can then also use "queryID" in your user journey.