cancel
Showing results for 
Search instead for 
Did you mean: 

How to get MYSAPSS02 from the Portal

Former Member
0 Kudos

Given that MYSAPSS02 is a http only cookie, how are we supposed to call the Portal using the windows user/password so that the MYSAPSS02 is returned and can be used?


I am writing a VB call to a SAP gateway service. Getting the cookie using a REST client like Postman, and pasting it into the Request Header as a cookie works fine to log on with. I just need to pragmatically get the cookie.....


Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Stephen,

You can use the AI generic iView to pass the MYSAPSSO2 as a parameter on the request.

Please read this official documentation:

Component com.sap.portal.appintegrator.sap.Generic - Portal - SAP Library

Then for example modify the

URL Template Fragment for Single Sign-On (SSO2) property value to

MYSAPSSO2=<Request.SSO2Ticket>


Then this expression will be inserted to the <Authentication> parameter and you can use it when passing the parameter in the URL Template property, for example:


http://myserver?language=<Request.Language>&<Authentication>


This will insert the MYSAPSSO2 ticket as a parameter on the request.


Best regards,

Etay

Former Member
0 Kudos

Although not recommended you can call the portal passing the URL parameters j_user (user name) and j_password (password).

Former Member
0 Kudos

I am trying to get the MYSAPSS02 cookie from the portal.

Former Member
0 Kudos

In order to get the cookie from portal you need to authenticate to it using one of the configured Login Modules. Once authenticated the cookie will be issued assuming it is also configured in the Login Module stack, which it is by default.

hemanth2
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can try tools like HTTPWATCH to capture the cookie details?

Former Member
0 Kudos

Yes I can see the cookie with a REST client (POSTMAN) as well. I can manually copy the cookie and use that to log onto SAP with the http call (in the header).

What I am trying to do is pragmatically get the cookie (by calling the Portal) and pass it on in the header of the call to the SAP gateway client.

SandipAgarwalla
Active Contributor
0 Kudos

For dev scenarios, you can pass the user id/password as Samuli has mentioned.

But for productive purpose, i think you should look at Single signing on from your front end server to Portal. Assuming you have a MS sharepoint, you can use SAML2 based authentication.

Sharepoint will authenticate the user, generate an artifact and pass it onto Portal. once portal verifies the user, it will again create SSO with the Gateway server.

In this way, you do not have to mention any id/password in your code.