Quantcast
Channel: Microsoft Online: SharePoint Online forum
Viewing all articles
Browse latest Browse all 10096

SP Online - Login to Sharepoint With External Users by Javascript

$
0
0

Hi!

In the past few days i'been struggling to create a javascript that allows me to authenticate External Users (e.g. a hotmail account) to Sharepoint. Of course first i have shared the site to that external user.

I have a code in Javascript with which i can authenticate normal Sharepoint users and works fine, it's something like this:

	function login(userID, password, url, successBlock, failBlock){
		$.ajax({
			url: 'https://login.microsoftonline.com/extSTS.srf',
			dataType: 'text',
			type: 'POST',
			data: getSAMLRequest(userID, password, url),
			headers: {
				Accept : "application/soap+xml; charset=utf-8"
				},
			success: function(result, textStatus, jqXHR) {
						var xmlDoc = $.parseXML(result);
						var xml = $(xmlDoc)
						var securityToken = xml.find("BinarySecurityToken").text(); 

But when i tried to use it with a hotmail account (with which i can access Sharepoint via browser as external user), it fails. The STS returns this error:

Direct login to WLID is not allowed for this federated namespace

I tried some alternatives like use this url instead: "https://login.live-int.com/extSTS.srf". But no luck (that url i believe it retrieves some CERT error or something).

Could someone point me into the right direction?

Regards,

Andres Nebel



Viewing all articles
Browse latest Browse all 10096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>