Do you have the same error when you use the command setspn :
setspn -d MSSQLSvc/servername.domainname.local:1433 sqlsvc.admin
Please don't forget to accept helpful answer
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
To avoid a kerberoasting issue, a client made a request to identify the users and take the necessary actions.
Removing the Service Principal Name seems to be the solution, but I have been unsuccessful in removing the SPN using the normal means.
The normal means:
Ran this code with admin privileges:
Set-ADUser -Identity sqlsvc.admin -ServicePrincipalNames @{Remove='MSSQLSvc/servername.domainname.local:1433'}
Result: an error showing the current user account does not have the required privilege.
Some things to note:
The user account used for the above scenarios is a domain admin with the schema admin and enterprise admin role. Verified the account is able to edit spn just fine.
The user account sqlsvcadmin mentioned to be edited is a service account and are a part of the domain admin group. The client created admin user shared the same spn but we are unable to remove it from that user either.
After my research I've come to the conclusion that it must be a service dependency that is denying the modification of the SPN.
I would like some insight and possible solutions to this issue.
-Cheers
Moshiur
Do you have the same error when you use the command setspn :
setspn -d MSSQLSvc/servername.domainname.local:1433 sqlsvc.admin
Please don't forget to accept helpful answer
Hello
Moshiur (Moshiur Khan),
Thank you for posting in Q&A forum.
You can give the permissions to the domain admin and check the result.
Right click the user you want to remove/delete the SPN from.
And select Properties and Security tab.
Check if the domain admin has permissions
Read ServicePrincipleName
Write ServicePrincipleName
Or
Read msDS-PrincilpeName
Read msDS-PrincilpeName
If no, you can try to give him/her permissions above.
If it odes not work, you can give him/her permissions below.
read all properties
write all properties
Hope the information above is helpful.
If you have any question or concern, please feel free to let us know.
Best Regards,
Daisy Zhou