sp-site-designs-studio
sp-site-designs-studio copied to clipboard
Apply-PnPTenantTemplate : Object reference not set to an instance of an object.
After connecting to our tenant using Connect-PnPOnline -useWebLogin as we got MFA enabled and trying to run the command described in the setup portion, it gives me this error.
Did anyone else run into this issue? Any workarounds?
Edit: Solved this issue by turning off MFA. Now I am getting The specified user c:0-.f|rolemanager|spo-grid-all-users/{tenantid} not found.
Usually when I see that error, it indicates I've made a mistake in the XML template file. I strip the XML down to its simplest state and then build it back up piece by piece so I can figure out where I've made my mistake.
Hello @CSeb96,
Unfortunately, it is a known issue for now. Something related has also been encountered here in issue #6
It turns out that the -WebLogin
option of PnP PowerShell seems to cause some issues when applying the tenant template.
I haven't had the opportunity just yet to figure it out the reason.
Just tried with device login, and the same issue occurs...
For now, indeed, the only error-proof solution is to turn off the MFA for the user that executes the script. I will try to come up with a workaround solution ASAP.
Kind regards, Yannick
Hey @ypcode , so i have turned off MFA for my user and was able to execute the script. It creates the site but doesnt install Design Studio and it gives me this error when done Executing.
I dont use the MFA parameter when I am executing the command and the correct tenant Id does get appended to it.
Thanks for your help :)
Hi @CSeb96 ,
Could you please try , on any of your SharePoint Site, try to add permissions to "Everyone" and see what you gets as the people suggestions ?
Regards, Yannick
Hey @ypcode I get 'Everyone except external users' group.
Cheers