0

I have an issue where I cannot change the primary site collection administrator of a site which is set to my user account.

In the central administration console when changing the name I get the error:

enter image description here

Running the set-spsite command in powershell it is indicating that it is a NullReferenceException.

any ideas on how to resolve this will be very much appreciated.

EDIT

02/28/2019 14:43:06.79 w3wp.exe (0x53EC) 0x36CC SharePoint Foundation Monitoring nasq Medium Entering monitored scope (Request (POST:http://server:5000/_admin/owners.aspx))

02/28/2019 14:43:06.79 w3wp.exe (0x53EC) 0x36CC SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (POST:http://server:5000/_admin/owners.aspx) 026d2244-b9f2-4b83-83a3-0837e178a172 02/28/2019 14:43:06.79 w3wp.exe (0x53EC) 0x36CC SharePoint Foundation Logging Correlation Data xmnv Medium Site=/ 026d2244-b9f2-4b83-83a3-0837e178a172

02/28/2019 14:43:06.79 w3wp.exe (0x53EC) 0x36CC SharePoint Foundation Monitoring b4ly High Leaving Monitored Scope (PostAuthenticateRequestHandler). Execution Time=3.90652513934052 026d2244-b9f2-4b83-83a3-0837e178a172 02/28/2019 14:43:06.82 w3wp.exe (0x53EC) 0x36CC SharePoint Foundation General g8ga Medium Begin Query the AD to get the user email and display name. 026d2244-b9f2-4b83-83a3-0837e178a172 02/28/2019 14:43:06.82 w3wp.exe (0x53EC) 0x36CC SharePoint Foundation General g8gb Medium End Query the AD to get the user email and display name. 026d2244-b9f2-4b83-83a3-0837e178a172

02/28/2019 14:43:06.83 w3wp.exe (0x53EC) 0x36CC SharePoint Foundation Runtime tkau Unexpected System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.SPUser.set_IsSiteAdmin(Boolean value) at Microsoft.SharePoint.SPSite.set_Owner(SPUser value) at Microsoft.SharePoint.Administration.SPSiteAdministration.set_OwnerLoginName(String value) at Microsoft.SharePoint.ApplicationPages.OwnersPage.BtnConfirm_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 026d2244-b9f2-4b83-83a3-0837e178a172

9
  • 1
    can you check the ULS logs for the correlation id mentioned in message?
    – Waqas Sarwar MVP
    Feb 28, 2019 at 15:22
  • Hi Waqas I have ammeded the post above by entering the ULS log as well it looks to be failing in the isSiteAdmin function Feb 28, 2019 at 15:47
  • is user profile conntected to web application? make sure site is not locked or quota is not full?
    – Waqas Sarwar MVP
    Feb 28, 2019 at 15:52
  • Have you tried updating the site admin using the -force switch? Feb 28, 2019 at 15:56
  • Waqas the site is not locked, and is well under the quota, the issue I believe is with the user Currently in the Primary SCA which was an account which was recreated. Christoffer the -Force switch is not working and throwing a Paramater set cannot be resolved using the specified named parameters which I believe indicates that the switch is not valid for changing the owneralias Feb 28, 2019 at 16:07

1 Answer 1

0

Fixed running the Move-SPUser command to a temporary account and then running the same command back again fixed the issue,

$user = Get-SPUser -Identity "DOMAIN\JaneDoe" -Web http://webUrl
Move-SPUser -Identity $user -NewAlias "Domain\JaneSmith" -IgnoreSid

This is taken from

https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/move-spuser?view=sharepoint-ps

Thank you Waqas for pointing me in the right direction

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.