Hi @Varadharaj, Silambarasan ,
Thanks for reaching out.
To select RelayState URLs based on the userType for a SAML-based app in Azure AD B2C, you can use custom policies and claims transformation. In the custom policy, you can define a claims transformation that sets the RelayState based on the userType claim. You can then use this claims transformation in the technical profile for the SAML-based app to set the RelayState in the SAML AuthN request.
Here are the high-level steps to achieve this:
- Define a claims transformation that sets the RelayState based on the userType claim in the custom policy.
- Use the claims transformation in the technical profile for the SAML-based app to set the RelayState in the SAML AuthN request.
https://learn.microsoft.com/en-us/azure/active-directory-b2c/claimstransformations
In azure, when you set up saml single signon, even in b2c, the saml options are the same, you can specify a relaystate optional parameter, and it will always go there after login.
Hope this will help.
Thanks,
Shweta
Please remember to "Accept Answer" if answer helped you.