4

I am using ADAL to authenticate a web app registered in Azure. Basically I am following this link

Is there any way I can pass additional parameters to CatchCode function. For example, lets say I need to provide CatchCode with ID of the currently selected item in database.

Any idea?

Garima
  • 401
  • 5
  • 29

1 Answers1

3

In your sign-in request URL, there's a state querystring parameter which gets returned along with the response. You can use this to pass the information your application needs when a user is returned back to your application after signing in. You can read more about this here: https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • hey thanks, Yes I noticed this but I was wondering if it is ok to use it for other purposes except CSRF attacks. – Garima Sep 22 '15 at 06:41
  • 1
    We use it in our application. The way we are using it is randomizing this string by appending some random string (GUID, ticks etc.) to the state data we need back in the application, encrypt it and send it in `state` querystring parameter. – Gaurav Mantri Sep 22 '15 at 06:46
  • ok. I just need to paas some ID parameters from UI to this. Will try this then. Thanks for your help. I guess there is not other way. – Garima Sep 22 '15 at 06:52