I am trying to execute a sas via 3.5 job using a client id and secret. I can see the job start successfully using the authenticated user. However, while the job starts, it fails shortly after with the following error: The SAS program provided for the job completed execution with at least one error.
500 : ""errorCode":30029,"message":"Failed to launch process.","details":["traceId: 916dbe177de581e0","path: /launcher/processes","path: /compute/contexts/3466208e-7633-48cd-9073-c2d47394c868/sessions"],"errors":["errorCode":30013,"message":"Failed to launch process: host=<HOST> port=44743 ssl=true","links":[],"version":2,"httpStatusCode":0,"errorCode":30012,"message":"Server error: status=0x80BFD100 messages=[ERROR: Access denied.]","links":[],"version":2,"httpStatusCode":0],"links":[],"version":2,"httpStatusCode":500" Note: I hid the server name for security. If, however, I restart the job from the environment manager by right-clicking and clicking "Execute" the job completes successfully. Failure: Success after retry: Quick note: I need to hide the user name for security. Below is how I am creating the client_id: curl -k -X POST "<SERVER>/SASLogon/oauth/clients" \
-H "Authorization: Bearer $BEARER" \
-H "Content-Type: application/json" \
-d '{
"client_id": "<USER>",
"client_secret": "<SECRET>",
"authorities": ["openid","uaa.user", "uaa.resource","sasapp", "sastoken","jobExecution", "session", "compute", "jobExecution.launch","job","files","casManagement","data","identity","read","write","execute","sas.jobs","sas.compute","sas.files","sas.identities","sas.data","sas.read","compute","audit","admin","authorization","credentials","jobDefinition"],
"scopes": ["openid","uaa.user", "uaa.resource","sasapp", "sastoken","jobExecution", "session", "compute", "jobExecution.launch","job","files","casManagement","data","identity","read","write","execute","sas.jobs","sas.compute","sas.files","sas.identities","sas.data","sas.read","compute","audit","admin","authorization","credentials","jobDefinition"],
"authorized_grant_types": ["authorization_code","client_credentials","refresh_token"],
"redirect_uri": ["http://localhost:5000/oauth/callback"],
"autoapprove": true
}' Note: user, server and secret have been obfuscated. here's how the login is happening after getting the auth code: curl -k <SERVER>/SASLogon/oauth/token \
-H "Accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" \
-u "<USER>:<SECRET>" \
-d "grant_type=authorization_code&code=<CODE>" here's how the job is launched: curl -X POST "<SERVER>/jobExecution/jobs" \
-H "Authorization: Bearer $BEARER" \
-H "Content-Type: application/json" \
-d '{
"jobDefinitionUri": "/jobDefinitions/definitions/<URI>"
}' I've also tried specifying the compute context. all to no avail. Keep in mind: I do get a response showing the job started, but it fails immediately after launch.
... View more