0

I'm using the new REST api in 2013 to retrieve information about the current user. My issue is that I always get zero results for the Groups element. This is what I'm using:

/_api/Web/currentuser/?$expand=groups

I do get information about the current user in the response, it's just that groups is always empty. When I do send the request to see site groups, it returns all the appropriate site groups.

/_api/Web/SiteGroups

I have a feeling that this may be related to some configuration in SharePoint, possibly User Profile Synchronization, but I cannot find anything online. I would appreciate some help.

  • Is your user added directly into a SharePoint group, or indirectly trough an AD security group. In the last case, this probably won't work. SharePoint is unable to check if that user is part of the AD groups (at least when you're querying the rest api) – Oak3 Jan 12 '16 at 20:45
0

I was able to solve this issue. I removed myself (current user) from one of the site groups, and then re-added myself, and now this one group (but not the other groups where I am) showed up.

I'm working on an environment upgraded from SharePoint 2010. I noticed that the user site id was the same before and after. I don't really know why it began to work after I deleted myself and then added myself back again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.