2

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

2

Try this:

var ctx = new SP.ClientContext();
var user = ctx.get_web().get_currentUser();
ctx.load(user);
ctx.executeQueryAsync(function() {
  var loginName = user.get_loginName();
  console.log(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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.