I understand you are unable to delete service principal from portal and CLI.
Could you please confirm how the service principal was created? Try to delete the service principal using PowerShell
Install-Module -Name Microsoft.Entra -Repository PSGallery -Scope CurrentUser -Force -AllowClobber
Connect-Entra -Scopes 'Application.Read.All', 'Application.ReadWrite.OwnedBy'
Get-EntraServicePrincipal // This lists all service principals. Copy your service principal's application ID.
Get-EntraServicePrincipal -Filter "displayName eq '{replace your application name}'" | Remove-EntraServicePrincipal
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.