A "Failed to obtain a valid credential" message occurs for selected users in SAS® Viya®


In SAS Viya, the following error might occur for selected users when they run a job using the Run As feature in Jobs and Flows:

Failed to obtain a valid credential. Contact your system administrator to check the status of the credential in the domain. path: /scheduler/jobs

As a result, the following conditions might occur:

This issue occurs in SAS® Viya® LTS 2026.03. The diagnostic approach outlined in this SAS KB article might be useful for other SAS Viya releases that provide the Jobs and Flows Run As functionality, but you must review the applicable product documentation for the deployed release.

Cause

The exact cause of this issue can vary. As a result, you must determine the cause from the identities, group-membership, credential, domain, authorization, and scheduling configuration.

A working service account does not, by itself, confirm that every user is authorized to retrieve and use the credential. Compare a user who can successfully use Run As with a user who receives the error.

You can identify the source case from the following configuration areas for investigation:

See SAS KB0036450 for information about troubleshooting the SAS Viya identities service and group membership.

Workaround

Method 1: Compare a Working User With an Affected User

Compare with a user who can successfully select the service account and run the job as the comparison.

Verify the following for both the working and affected users:

Method 2: Verify the Service Account and Credential Domain

Verify the following configuration:

Note: Do not include service-account passwords, secrets, tokens, or other credential values in a SAS Technical Support case.

Method 3: Determine Whether the Failure is Specific to Run As

Complete the following steps:

  1. Run the same job as the affected user without selecting Run As.
  2. Record whether the job starts successfully.
  3. Run the same job with Run As.
  4. Record the exact time that the error occurs.
  5. Confirm whether the failure occurs before the job begins to execute.
  6. Test the same service account with a known working user.
  7. Record the results of each test.

If the job runs without Run As but fails before execution when Run As is selected, focus the investigation on credential retrieval, group membership, domain configuration, and authorization rather than on the SAS program executed by the job.

Method 4: Collect Diagnostic Information

Collect logs from the failure time for the services involved in the following:

Also, collect the current SAS Viya diagnostic information by using the latest SAS Technical Support get-k8s-info utility.

See SAS KB0038941, "SAS® Viya® for Kubernetes Diagnostic Documentation" for additional information.

Provide the following information with the logs:

Additional Resources

Review the following SAS KB articles: