Remove-AzureRmADServicePrincipal

Deletes the azure active directory service principal.

Syntax

Remove-AzureRmADServicePrincipal
      -ObjectId <Guid>
      [-PassThru]
      [-Force]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Deletes the azure active directory service principal.

Examples

-------------------------- Delete AAD service principal. --------------------------

PS C:\> Remove-AzureRmADServicePrincipal -ObjectId 61b5d8ea-fdc6-40a2-8d5b-ad447c678d45

Deletes the given azure active directory service principal.

Required Parameters

-ObjectId

The object id of the service principal to delete.

Type:Guid
Aliases:PrincipalId
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

{{Fill Force Description}}

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PassThru

If specified, returns the deleted service principal.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf
Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Graph.RBAC.Version1_6.ActiveDirectory.PSADServicePrincipal

Notes

Keywords: azure, azurerm, arm, resource, management, manager, resource, group, template, deployment