Home ยป Office 365 ยป Remove-MsolServicePrincipal – Remove Service Principal

Remove-MsolServicePrincipal – Remove Service Principal

The Remove-MsolServicePrincipal cmdlet in PowerShell removes a service principal from Microsoft Office 365.

The syntax to remove a service principal from Azure Active Directory is given below.

Remove-MsolServicePrincipal
      -ObjectId <Guid>
     -AppPrincipalId <Guid>
    -ServicePrincipalName <String>
      [-TenantId <Guid>]
      [<CommonParameters>]

In this article, we will discuss how to use the Remove-MsolServicePrincipal cmdlet in PowerShell to remove a service principal from Azure Active Directory.

How to Remove a Service Principal

To remove a service principal from Office 365, use the Remove-MsolServicePrincipal cmdlet with the -ServicePrincipalName parameter.

The -ServicePrincipalName parameter specifies the name of the service principal or service principals to remove.

Remove-MsolServicePrincipal -ServicePrincipalName "ShellGeekApp/ShellApp.com"

This command removes a service principal by specifying the service principal name โ€œShellGeekApp/ShellApp.comโ€œ.

Conclusion

I hope the above article on how to use the Remove-MsolServicePrincipal cmdlet in PowerShell to remove a service principal from Azure Active Directory is helpful to you.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.

Related Links

New-MsolServicePrincipal

Get-MsolServicePrincipal

Set-MsolServicePrincipal

Leave a Comment