Try using the beforeSend property instead of xhrFields. In your case:
var ajaxOptions = { url: serviceResourceUrl, type: "get", dataType: "json", success: successCallback, error: failedCallback, beforeSend: function(xhr){ xhr.withCredentials = true; } }; $.ajax(ajaxOptions); You can learn more here: Sending credentials with cross-domain posts?Sending credentials with cross-domain posts?