Hello,
I'm trying to send a POST API request using PROC HTTP through a Stored Process (UI),
Since the user is already logged in, I want to use the same credentials instead of writing the username and password in \
/* Send http request from Stored Process */
PROC HTTP
METHOD="POST"
URL="http://application-name/SASComplianceSolutionsMid/.../...."
CT="application/json"
IN=input
OUT=output
WEBUSERNAME="username"
WEBPASSWORD="password"
/* AUTH_NEGOTIATE */
;
RUN;
However this code responds with HTTP Status 403 - Forbidden, not sure about the reason,
I also tried to use the AUTH_NEGOTIATE option instead of the basic authentication option, but it didn't work as expected and it returns HTTP Status 401 - Unauthorized Access. I expected that it will use the same credentials for the logged-in user.
HTTP Negotiate is an authentication extension that is used commonly to provide single signon capability to web requests. This is normally used in PROC HTTP when a password is not provided, since it will use the current user’s identity for authentication. Link
Am I missing something? Or is it applicable to send the API request in such a way without determining a specific credential in the code?
Thanks.