I've been running into a problem with permissions of AD groups occurring within SP groups. It's a well-documented point of ouch that I'm struggling with.
Ultimately, I want to loop through all the groups that a user belongs to and add a class to the tag of the site in order to apply some CSS to a few pages depending on the permissions of the user. The solution that worked for users directly added to a SP group is here. But this solution fails for group members who belong to the group, but are added via AD group instead.
In exploring a little bit further, I noticed that when I manually click on the Check Permissions button that is located on
sites/[sitename]/_layouts/15/user.aspx, that the permissions are listed correctly no matter how a user has been added to the SP group.
My question: is there a way to access the results of whatever test is being performed by this "button" programmatically to do the same thing?
Thanks in advance!