I have a web part in which I am displaying users from User Profile Service which is synced with AD.
In my code I get all the users in current site and then see if they are part of any group. If they are then I get their First Name from UPS and display on screen.
I have a group named "Restricted Users" in which I have added all users as "Everyone" and "NT Authority\authenticated user".
On my web part page no users are displayed unless I do the following:
- Go to site settings
- Click on "Site permissions"
- Click on "Check permissions", enter user name and press OK upon which it shows that this user is part of "Restricted Users" group.
- Now after that when I refresh web part page, it shows that particular user.
Why is that? So basically I have to go and "Check permissions" for each user before they are displayed on page. This is very strange.