Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply-PnPTenantTemplate : Object reference not set to an instance of an object. #9

Open
CSeb96 opened this issue Jul 19, 2020 · 5 comments
Assignees
Labels
bug Something isn't working waiting for response

Comments

@CSeb96
Copy link

CSeb96 commented Jul 19, 2020

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.

image

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.

@sympmarc
Copy link

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.

@ypcode
Copy link
Collaborator

ypcode commented Jul 21, 2020

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

@CSeb96
Copy link
Author

CSeb96 commented Jul 29, 2020

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.

image

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 :)

@ypcode
Copy link
Collaborator

ypcode commented Jul 30, 2020

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

@ypcode ypcode self-assigned this Jul 31, 2020
@ypcode ypcode added bug Something isn't working waiting for response labels Jul 31, 2020
@CSeb96
Copy link
Author

CSeb96 commented Aug 3, 2020

Hey @ypcode I get 'Everyone except external users' group.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for response
Projects
None yet
Development

No branches or pull requests

3 participants