2

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

2
  • Did you want me to add an actual script to replicate a User's explicit permissions onto a test account?
    – KGlasier
    Commented Feb 7, 2019 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 T.
    Commented Feb 8, 2019 at 13:35

1 Answer 1

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 agree to our terms of service and acknowledge you have read our privacy policy.

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