Authentication on Workday web service

Viewed 81

Trying to perform request on Workday Human Resources web service V38.1

I have successfully done so using SOAP UI.

Have created .cs file using WSDL.exe

Trying to create a client using from the generated .cs file:

public partial class HumanResourcesService : System.Web.Services.Protocols.SoapHttpClientProtocol

Then

_proxy = new HumanResourcesService();
_proxy.UseDefaultCredentials = false;
_proxy.Credentials = new NetworkCredential(WorkdayHRWebservicesUsername, WorkdayHRWebservicesPassword); 
_proxy.PreAuthenticate = true;

Then using the proxy

var response = _proxy.Get_Worker_Profile(request);

Returns

System.Web.Services.Protocols.SoapHeaderException: 'invalid username or password'

Username and password is correct.

1 Answers

Workday Username when making web service calls via SOAP is a bit finnicky. I'm guessing that your WorkdayHRWebservicesUsername is incorrect, because you need to include the tenant in this field. Like this: {username}@{tenant}

If my tenant username is "ErikOverflow", and my tenant is "XYZCompany", then my webservice username would be "ErikOverflow@XYZCompany"

Related