Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: GetUserLoginFromEmail - prompting for credential for the logged in site.

$
0
0

I am trying to get login ids of multiple users from array of email accounts but it is prompting me for the username and password for the same site that I'm logged in to. If I give myself full control it works fine but I want this functionality to work for end users with minimum permissions. Is there any way to make this work, am I doing something wrong here? Any help suggestions will be highly appreciated.

This is the portion on my code:

<script language=JavaScript src="/js/1.5.0/jquery.min.js" type=text/javascript></script>

<script language=JavaScript src="/js/jquery.SPServices-0.2.10a.js" type=text/javascript></script>

<script>

$(document).ready(function(){

for(i=0; i<emailArray.length; ++i){

$().SPServices({

 operation: "GetUserLoginFromEmail",

 async: false,

emailXml:"<Users><User Email='"+emailArray[i+1]+"'/></Users>",

completefunc: function (xData, Status)

{

$(xData.responseXML).find("User").each(function(){

var loginId=($(this).attr("Login"));

var finalLoginId=loginId.replace("\\",""_"); });

}

});

}})

</script>


Viewing all articles
Browse latest Browse all 6517

Trending Articles



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