external help file: Microsoft.Online.Administration.Automation.PSModule.dll-Help.xml online version: schema: 2.0.0 ms.assetid: 87A60137-58ED-473B-9D1E-BB7C0CD8F8A2 ms.reviewer: rodejo ms.custom: iamfeature=PowerShell
Removes a service principal from Azure Active Directory.
Remove-MsolServicePrincipal -ObjectId <Guid> [-TenantId <Guid>] [<CommonParameters>]
Remove-MsolServicePrincipal -AppPrincipalId <Guid> [-TenantId <Guid>] [<CommonParameters>]
Remove-MsolServicePrincipal -ServicePrincipalName <String> [-TenantId <Guid>] [<CommonParameters>]
The Remove-MsolServicePrincipal cmdlet removes a service principal from Azure Active Directory.
PS C:\> Remove-MsolServicePrincipal -ServicePrincipalName "MyApp/myApp.com"
This command removes a service principal by specifying one of its service principal names. In this example, the service principal associated with the service principal name MyApp/myApp.com is removed.
Specifies the unique application ID of the service principal to remove.
Type: Guid
Parameter Sets: RemoveServicePrincipalByAppPrincipalId__0
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the unique object ID of the service principal to remove.
Type: Guid
Parameter Sets: RemoveServicePrincipal__0
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the name of the service principal or service principals to remove. An SPN must use one of the following formats:
appName
appName/hostname
- a valid URL
AppName represents the name of the application and hostname represents the URI authority for the application.
Type: String
Parameter Sets: RemoveServicePrincipalBySpn__0
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the unique ID of the tenant on which to perform the operation. The default value is the tenant of the current user. This parameter applies only to partner users.
Type: Guid
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).