Is there a way of detecting the type of authentication used by SharePoint from the client browser?

Edit It doesn't have to be via the Client Object Model. If there is a SharePoint JS parameter that tells me this information then even better

1 Answer 1


Try this:

var ctx = new SP.ClientContext();
var user = ctx.get_web().get_currentUser();
ctx.executeQueryAsync(function() {
  var loginName = user.get_loginName();

Now you shold be able to see the type in the loginName variable.
I'm not 100% sure, but its worth a try. For example I get i:0#.w|somedomain\user and i:0#.f|aspnetmembership|otheruser

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.