2

I keep getting "Sorry, this site hasn't been shared with you." after I ran

$wa = Get-SPWebApplication -Identity “<WebApplication>”

$wa.Properties[“portalsuperuseraccount”] = “<SuperUser>”

$wa.Properties[“portalsuperreaderaccount”] = “<SuperReader>”

$wa.Update()

I tried to undo by saying:

$wa = Get-SPWebApplication "URL"

$wa.Properties.Remove("<SuperUser>")

$wa.Properties.Remove("<SuperReader>")

$wa.Update()

but i keep getting access denied

7
  • fow which user you are getting this error message? for all? Have you tried IIS reset, you can set permission with Web Application Policy to, for FULL READ. Feb 24, 2019 at 13:57
  • from site collection administrator.... i tried several IIS resets and even restart of server- what do you mean "you can set permission with Web Application Policy to, for FULL READ" ? where?
    – Saz Mifsud
    Feb 24, 2019 at 14:22
  • check in Central Administration > Application Management > Site Collection Administrators if there is set proper account. You can set FULL READ or FULL control (User Policy) in Web Application panel, select web application and in ribbon on right side is User Policy Feb 24, 2019 at 16:09
  • all that is set but still get the access denied.
    – Saz Mifsud
    Feb 24, 2019 at 16:48
  • hm this is odd.. any different account works? Feb 24, 2019 at 17:21

1 Answer 1

1

setting up the Object cache is 2 steps process:

  1. add the superuser and super reader in the Policy of Web applications
  2. Run powershell script to set the super user and super reader in web application's property.
  3. Lastly, perform the IIS reset farm wide ( on all server).

Things to check:

  • make sure you completed above steps.
  • used the right accounts on both steps.
  • Most Important, Make Sure when you run the powershell, add the proper claims for the users. I am sure you are using the claims enabled web application.

check this gallery code, may be help you to fix the issue.

https://gallery.technet.microsoft.com/office/SharePoint-2016-Object-888ce77f

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.