[IdP] Missing Input Parameter in IdP Original URL
Forge component by Rui Barbosa
Application Type
Reactive

Hi all, 

I am having an issue with the IdP DoLogin's originalURL. I tried to check on the URL and found that it has been discarded when passed to the IDP.

Our flow: OnException, we redirect the user to the IdP SSO Landing Page,  and it will capture the LoginURL as below.

But when it arrived to IdP, the OriginalURL became :

As you can see, the second parameter is being discarded. I've also checked on the flow of the Login.aspx,

which brings me to this JavaScript: Does this JavaScript affected the URL? P/s: I'm not quite familiar with the IdP ??

Any advice would be much appreciated.


Regards,

Kenny

mvp_badge
MVP
Solution

Right I was able to replicate the issue and found a solution (OML is included as an attachment):

  • Create a separate ExternalSite RedirectIdpURL which has an additional Input Parameter OriginalURL


  • Inside your OnException Flow, make sure to use the RedirectIdpURL as an ExternalSite node (instead of the RedirectToURL) and fill in the values for URL and OriginalURL accordingly

  • As you can see now both input parameters are received in the OriginalURL parameter of the DoLogin screen inside IdP

Let me know if it helped.

Regards,

Nordin


RedirectReact.oml

Thanks Nordin!

I've created a separate ExternalSite as follow: 

This is inside the app while I've also created another separate ExternalSite in the Idp module which will call another screen (IdpReact) for rerouting where it will require another input and dynamic URL as the input parameter. It has solved the issue after the implementation! Thanks again and really grateful for your kind assistance!

Just curious, why does the previous OriginalURL doesn't work and the text behind the last "&" is being discarded?

Regards,

Kenny

mvp_badge
MVP

I'm glad I was able to help you Kenny.

And sorry for the misunderstanding in the beginning :)

mvp_badge
MVP

Hi Kenny,

I must have missed your last question. You asked:

Just curious, why does the previous OriginalURL doesn't work and the text behind the last "&" is being discarded?

I'll try to explain what happened and why it wasn't working in the first place.

The entire URL you originally had was: 

/IdP/Login.aspx?OriginalURL=https://youroriginalurl?ANEReportId=76&RCGSReportId=57 

For simplicity's sake, we'll call the yellow part the outer URL and the blue part the inner URL.

So basically the outer URL value is passed through as a single string to the ExternalSite node (RedirectToURL.URL) and we're asking the platform to extract the value of the inner URL in order to pass that value as the OriginalURL to IdP

What happens then is, from left to right the code starts to read the outer URL and identifies the question mark ? and with that the first outer URL parameter OriginalURL and after the ampersand & the second outer URL parameter RCGSReportId

Even though RCGSReportId should be considered a URL parameter of the inner URL, this cannot be identified during code execution because it's a single URL string and the outer URL is leading in this case.

As you can see from the below screenshot, the result was indeed that only the blue part https://youroriginalurl?ANEReportId=76 was extracted and passed as the OriginalURL input parameter inside IdP.


For the solution, we simplified the code by creating an ExternalSite with two URL inputs: one for the outer URL and one for the inner URL

This way there can be no misunderstanding during code execution and the platform knows exactly what is considered to be the OriginalURL.

I hope this made it more clear!

Regards,

Nordin

Hi Nordin,

Thank you so much for the clear explanation!

So basically the outer URL value is passed through as a single string to the ExternalSite node (RedirectToURL.URL) and we're asking the platform to extract the value of the inner URL in order to pass that value as the OriginalURL to IdP. 

What happens then is, from left to right the code starts to read the outer URL and identifies the question mark ? and with that the first outer URL parameter OriginalURL and after the ampersand & the second outer URL parameter RCGSReportId. 

Even though RCGSReportId should be considered a URL parameter of the inner URL, this cannot be identified during code execution because it's a single URL string and the outer URL is leading in this case.

This had cleared up my question earlier. So basically the URL is being read with two input parameters:

OriginalURL = "https://youroriginalURL?ANEReportId=76"
RCGSReportId = "75", which makes the URL not behaving properly.

Thanks again for the help!

Regards,

Kenny


mvp_badge
MVP

Exactly Kenny, you understood correctly!

You're most welcome, happy to help :)

Regards,

Nordin

mvp_badge
MVP

Hi Kenny,

I noticed you have added a second '?' before the ANEReportId parameter in your LoginURL. 

As you may know already, in a URL everything after the question mark (?) is considered a URL parameter (key=value) and multiple URL parameters need to be joined by an ampersand (&).

So in your case, if you want that parameter to be recognized you should replace the second '?' before the ANEReportId parameter with a '&':

/IdP/Login.aspx?OriginalURL=https://youroriginalurl&ANEReportId=76&RCGSReportId=57

Hope this helps!

Regards,

Nordin


EDIT: This was not the problem as the ANEReportId and RCGSReportId parameters are part of the OriginalURL

Hi Nordin,

Good day. Thanks for your reply. I've replaced the second (?) and it became 

But when it reached IdP, it became this instead: Did I missed something?

Regards,

Kenny

mvp_badge
MVP

Hi Kenny,

I'm not sure what you are trying to accomplish here.

If you want the DoLogin screen to receive the values sent in the ANEReportId and RCGSReportId parameters, you should add them as Input Parameters to the DoLogin screen and handle them accordingly inside the Preparation.

EDIT: This was not the problem as the ANEReportId and RCGSReportId parameters are part of the OriginalURL

Hi Nordin, 

We want the DoLogin Screen to receive the URL as text. After the user logged in with IdP, they will be rerouted back to the original URL. It worked properly with a single parameter, for example :

/ScreenDetail?Id=5 but not /ScreenDetail?Id=5&UserId=331

Regards,

Kenny

mvp_badge
MVP

Hi Kenny,

Sorry I have misread the situation, so you can ignore what I mentioned above :).

Now, can you share a screenshot with me of the RCGSDetails screen with its Input Parameters? Does it include the parameter RCGSReportId (the one that is missing)?

Regards,

Nordin

Hi Nordin,

The screenshot is as below: 

Both input parameters are mandatory.

Regards,

Kenny

mvp_badge
MVP
Solution

Right I was able to replicate the issue and found a solution (OML is included as an attachment):

  • Create a separate ExternalSite RedirectIdpURL which has an additional Input Parameter OriginalURL


  • Inside your OnException Flow, make sure to use the RedirectIdpURL as an ExternalSite node (instead of the RedirectToURL) and fill in the values for URL and OriginalURL accordingly

  • As you can see now both input parameters are received in the OriginalURL parameter of the DoLogin screen inside IdP

Let me know if it helped.

Regards,

Nordin


RedirectReact.oml

Thanks Nordin!

I've created a separate ExternalSite as follow: 

This is inside the app while I've also created another separate ExternalSite in the Idp module which will call another screen (IdpReact) for rerouting where it will require another input and dynamic URL as the input parameter. It has solved the issue after the implementation! Thanks again and really grateful for your kind assistance!

Just curious, why does the previous OriginalURL doesn't work and the text behind the last "&" is being discarded?

Regards,

Kenny

mvp_badge
MVP

I'm glad I was able to help you Kenny.

And sorry for the misunderstanding in the beginning :)

mvp_badge
MVP

Hi Kenny,

I must have missed your last question. You asked:

Just curious, why does the previous OriginalURL doesn't work and the text behind the last "&" is being discarded?

I'll try to explain what happened and why it wasn't working in the first place.

The entire URL you originally had was: 

/IdP/Login.aspx?OriginalURL=https://youroriginalurl?ANEReportId=76&RCGSReportId=57 

For simplicity's sake, we'll call the yellow part the outer URL and the blue part the inner URL.

So basically the outer URL value is passed through as a single string to the ExternalSite node (RedirectToURL.URL) and we're asking the platform to extract the value of the inner URL in order to pass that value as the OriginalURL to IdP

What happens then is, from left to right the code starts to read the outer URL and identifies the question mark ? and with that the first outer URL parameter OriginalURL and after the ampersand & the second outer URL parameter RCGSReportId

Even though RCGSReportId should be considered a URL parameter of the inner URL, this cannot be identified during code execution because it's a single URL string and the outer URL is leading in this case.

As you can see from the below screenshot, the result was indeed that only the blue part https://youroriginalurl?ANEReportId=76 was extracted and passed as the OriginalURL input parameter inside IdP.


For the solution, we simplified the code by creating an ExternalSite with two URL inputs: one for the outer URL and one for the inner URL

This way there can be no misunderstanding during code execution and the platform knows exactly what is considered to be the OriginalURL.

I hope this made it more clear!

Regards,

Nordin

Hi Nordin,

Thank you so much for the clear explanation!

So basically the outer URL value is passed through as a single string to the ExternalSite node (RedirectToURL.URL) and we're asking the platform to extract the value of the inner URL in order to pass that value as the OriginalURL to IdP. 

What happens then is, from left to right the code starts to read the outer URL and identifies the question mark ? and with that the first outer URL parameter OriginalURL and after the ampersand & the second outer URL parameter RCGSReportId. 

Even though RCGSReportId should be considered a URL parameter of the inner URL, this cannot be identified during code execution because it's a single URL string and the outer URL is leading in this case.

This had cleared up my question earlier. So basically the URL is being read with two input parameters:

OriginalURL = "https://youroriginalURL?ANEReportId=76"
RCGSReportId = "75", which makes the URL not behaving properly.

Thanks again for the help!

Regards,

Kenny


mvp_badge
MVP

Exactly Kenny, you understood correctly!

You're most welcome, happy to help :)

Regards,

Nordin

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.