Suppress browser authentication when users do not have access to source of data

Apr 21, 2016 at 1:04 PM
Code is below. This is embedded to a page on my site and works nicely.

My question is how to stop the browser from displaying an authentication prompt when /Sites/Records/_vti_bin/listdata.svc returns a 401.

In this instance the user does not have access to the data and so I expect nothing to be bound, I don't want the user to be prompted for authentication.

var self = this;
self.Records = ko.observableArray([]);

$.getJSON("/Sites/Records/_vti_bin/listdata.svc/Records?$orderby=Created desc&$top=10",
function (data)
if (data.d)