Forum Discussion
PNP remote provision site user could not be found.
I can't say for certain how the user was added originally (not sure if that's what you are asking), I know the users causing the issue were added in the past to sites etc... using the SharePoint 2013 GUI. The users are no longer with the company so their AD accounts are gone. Sharepoint still has references to them in site groups, addtional owners/administrators and so the PNP template does it's job and reads these groups/additional owners when extracting a site. When I try to apply the PNP template to a new site it gets the exception because the user is invalid when the ObjectSiteSecurity code tries to AddUserToGroup.
I wrote a utility that parses the PNP template xml and validates each user against AD and removes them.
It seems it can not find the users so you first have to remove them out the template.