This project has moved and is read-only. For the latest updates, please go here.

SPGetCurrentUser and SharePoint group with nested AD groups

Jul 1, 2011 at 7:05 PM

I have created several SharePoint groups and they have nested AD groups.

For example,


Notice no users are in SP_Group1.  I tried the following and I don't get anything returned.

var thisUserAccount = $().SPServices.SPGetCurrentUser({
fieldName: "Name",
debug: false

I added a "testUser" to SP_Group1 and the above works.


Am I missing something here?

Jul 1, 2011 at 7:13 PM
If you check the docs, SPGetCurrentUser has nothing to do with groups. It just does an AJAX call to get _layouts/UserDisp.aspx and scrapes the values from the page.

What you're describing doesn't make any real sense unless in the first case you weren't logged in (anonymous).

Jul 1, 2011 at 9:32 PM

I see it scrapes values from that page... that makes sense - sorry for the lame question.  So basically if a user isn't in /_catalogs/users/ then SPGetCurrentUser method will not return anything.

Jul 1, 2011 at 11:35 PM

Correct, though a user who isn't in the User Information List usually isn't really a user.