Forum Discussion
Allow Custrom Scripting on a specific SP site
Deleted wrote:
Ahhh, yeah that's probably going to be it then. They still haven't quiet got that ironed out yet with the roles. Does it let you explicitly assign your user account as site admin using
set-spouser -loginname user@user.com -site "siteurl" -issitecollectionadmin $true
I know if your just a group owner and not explicitly assigned that can cause issues too. If you get same error trying to do that for yourself then it most likely is the global admin issue.
I was able to set my SP Admin user as site collection admin using the cmdlet, but still no luck with allowing custom script. I'll have one of our Global Admins try it and see if it works for them.
I tried this in another (test/dev) tenant we have and it works fine. I believe I have the same permissions in both environments, and the only difference in configuration is that in production, we have the Create Site button hidden, while in dev/test, it's not. I don't think that should have anything to do with this setting, but it might.
- AnonymousAug 16, 2018Wow.... thanks for following up, it crossed my mind to suggest that, but figured you had put it in chat wrong... lol. Doh! Glad you figured it out.
- Chad_V_KealeyAug 16, 2018Iron Contributor
OK, after some additional testing today, I figured out the issue. When specifying the site URL, I was including the trailing slash (e.g.: https://<tenant>.sharepoint.com/sites/<siteURL>/), so Powershell was expecting that (sites/<siteURL>/) to be a managed path, when it is not. Leaving the slash off (e.g.: https://<tenant>.sharepoint.com/sites/<siteURL>), it works fine.