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

New Post: Prompt for site authentication in GetGroupCollectionFromUser

$
0
0
I am working in a SharePoint 2010 site that requires Common Access Card (CAC) authentication.

I am using SPServices GetGroupCollectionFromUser to determine if the current user belongs to a SP Group and then configuring the view where Target Audience is not applicable. It works fine except that the user is prompted for authentication even after they have authenticated into the site. Removing the call to GetGroupCollectionFromUser eliminates the authentication prompt.

Why is it prompting for authentication again? Has anyone seen this happen?

Here is my code:
//get user's group
$().SPServices({
    operation: "GetGroupCollectionFromUser",
    userLoginName: $().SPServices.SPGetCurrentUser(),
    async: false,
    completefunc: function(xData, status){
        $(xData.responseXML).find("Group").each(function(){
            if(status == "success"){
                var groupName = $(this).attr('Name');
                if(groupName == "SomeGroupName")
                {
                    //Do something;
                }
            }
        });
    }
});

Viewing all articles
Browse latest Browse all 6517

Trending Articles



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