cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MII transaction call: logon screen despite 200 response

johnbraun
Newcomer
303

Hi everyone!

I am trying to call a SAP MII transaction with a python script. I am authenticating the user with Kerberos and I receive a 200 response (not 401). But the HTTP GET request receives only the logon screen and not the data from the transaction. In Chrome and Edge it works as expected and I receive the output data from the transaction. Any ideas why this is happening?

If it helps, here is the python code:

import requests
import winkerberos as kerberos
url = "http://<SERVER>:<PORT>/XMII/Runner?Transaction=<TRANSACTION>"
status, krb_context = kerberos.authGSSClientInit("HTTP@<SERVER>")
step = kerberos.authGSSClientStep(krb_context, "")
negotiate_details = kerberos.authGSSClientResponse(krb_context)
headers = {"Authorization": "Negotiate " + negotiate_details}
response = requests.get(url, headers=headers)
tmpTxt = open("C:\\Temp\\tmp", "wb")
tmpTxt.write(response.text.encode("utf-8"))
tmpTxt.close()

Best regards,
John Braun

Accepted Solutions (0)

Answers (1)

Answers (1)

eli_dealmeida
Explorer

Hi John,

Interesting about authentication using Kerberos.
In this configuration of yours, you are considering (HTTP Request Parameters):

  • IllumLoginName = username
  • IllumLoginPassword = pass

Passing of User authentication details to SAP MII Web service

SAP Single Sign-On: Authenticate with Kerberos/SPNEGO

BR,

Eli Soares De Almeida