RaaS 401 Error Returns Plain Text Instead of Requested XML Format
The error curl -H 'Accept: text/xml' 'https://...(url to report)&format=xml', it returns a plain text error 401 : invalid username or password
What it means
When a RaaS call fails authentication, Workday ignores the requested response format (format=xml or an Accept: text/xml header) and returns the 401 error as plain text instead of well-formed XML, which breaks any downstream code that expects to parse every response, success or failure, as XML.
Troubleshooting
- Confirm the failure mode: check whether your parser is throwing on malformed XML specifically at the point of a 401, not a general connectivity issue.
- Don't rely on the report's declared format parameter to guarantee response shape on error paths, Workday's error responses for RaaS are plain text regardless of format=xml or the Accept header.
- Check the HTTP status code first (401) before attempting to parse the body as XML, and branch your error handling on status code rather than assuming the body is always well-formed.
- Fix the actual credentials or authorization problem causing the 401 separately, this behavior is a response-format quirk, not the root cause of the auth failure itself.
⚡ Quick fix
Check the HTTP status code before parsing the response body, and handle non-2xx RaaS responses as plain text rather than assuming XML.
✓ Permanent fix
Wrap all RaaS-calling code in status-code-first error handling so a future auth failure (expired password, locked ISU, revoked access) degrades gracefully instead of throwing an XML parse exception.
Was this helpful?