2

Is it possible to emulate a user in SharePoint 2016 for the purpose of verifying what data/pages they can access/view?

  • Did you want me to add an actual script to replicate a User's explicit permissions onto a test account? – KGlasier Feb 7 at 20:56
  • @KGlasier. Thank you for the offer, but no need. We're using AD, so I'll just get a "test user" account and verify. Thank you for your help. – Susan Feb 8 at 13:35
2

Assuming you're using AD, I'd suggest making a "test user", something like DOMAIN\testAccessUser. Then if your permissions for pages are based off of AD Security groups you can just replicate their security onto the account and log in with said account.

Alternatively, if your permissions for the pages are explicit (permission given to the user and not a security group) then you could replicate permissions with a PowerShell script. I'll whip something up in a minute that should work, but I bet there's pre-made scripts out there to do just that.

The premise of the script would be

Go to every Site in the WebApplication
    Check permissions given directly for the User
    Check permissions given by SharePoint groups to the User

    Go to every Web in the Site
        Check permissions given directly for the User
        Check permissions given by SharePoint groups to the User

        Go to every list in the web
            Check if the list inherits permissions or not
                If it does, check next list
                If it doesn't
                    Check permissions given directly for the User
                    Check permissions given by SharePoint groups to the User

            Check if each item in the list inherits, if it doesn't
                Check permissions given directly for the User
                Check permissions given by SharePoint groups to the User

Then for each instance where the User of interest is, add the TestAccount.

Then you'd need a script to remove permissions for the TestAccount once you were done validating.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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