Error on User Profile...

Jul 28, 2011 at 3:40 PM

Hi Brian,

FYI... Not sure if I am doing something wrong but it appears as though there is an error in the user profile script... On the line you added in the latest version...

$CurrentUserAcctPrincipal·=·New-SPClaimsPrincipal·-Identity·$env:USERDOMAIN\$env:USERNAME·-IdentityType·WindowsSamAccountName

Error...

 Waiting for User Profile Service Application...........................................................................................Online
 - Creating User Profile Service Application Proxy...
 - Granting rights to User Profile Service Application...
Grant-SPObjectSecurity : Cannot validate argument on parameter 'Identity'. The
argument is null. Supply a non-null argument and try the command again.
At D:\AutoSPInstaller\Scripts\ATPSPInstallerFunctions.ps1:1888 char:27
+                 Grant-SPObjectSecurity <<<<  $ProfileServiceAppPermissions -P
rincipal $CurrentUserAcctPrincipal -Rights "Full Control"
    + CategoryInfo          : InvalidData: (:) [Grant-SPObjectSecurity], Param
   eterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Share
   Point.PowerShell.SPCmdletGrantObjectSecurity
 

Jul 28, 2011 at 7:29 PM

It appears to me that a value in the input xml is missing.

Coordinator
Jul 29, 2011 at 3:44 AM

Actually I just ran into a similar error whereby it complained about the $PortalAppPoolAcct being null. Turns out I had commented out the entire <Web Applications> node in the XML for testing, and so $PortalAppPoolAcct was null. Check your situation if you can figure out why your value for 'Identity' is null here. I will implement some checking in the script to verify that $PortalAppPoolAcct and the other app pool account variables aren't null before trying to run New-SPClaimsPrincipal.

Brian