How can i pass in additional data through the sign in button?

For example there is a string called “district” in the sign in page that needs to be passed to the post sign-in page, how can i do that? Thanks in advance!\   Edit For more context, my application actually have afew preset districts, and it is not created nor deleted pre or post sign in. In the database exist the districts, and I used the url/{Id} method to retrieve the district object when i land in the sign in page. Now that i have a district object pre sign-in, I would like to sign-in and somehow still be able to retrieve the district that was retrieved, pre sign-in. Im not using SSO.
3 answers

If this string is stored in an object you might want to associate it with entity Session and set the association on create with $currentSession. Then after sign-in you can retrieve the object from $currentSession on your page.


Hi Raphael

Can you provide a bit more context?  Where will this “district” value be coming from?  Are you expecting this to come from an external system somewhere?  Are you using SSO? 

As an example, you can usually pass through SAML Assertion Attributes containing this type of information if you use the SAML module.  You can then link this value to your user/account through the “CustomUserProvisioning” microflow.  These assertion attributes are controlled by your Identity Provider.  Below is a link to how someone set up SSO with Okta.  Look specifically for the “assertion data” section in this blog post:

How to use the SAML module with IDP Okta



Or use a deeplink where you pass this parameter. If  a user needs to login first it will show the signin page. But then it will continue with the deeplink so that you have an the user and the parameter to do the stuff you want.