Edit

Share via


Remove-EntraBetaServicePrincipalPolicy

Delete a servicePrincipal policy.

Syntax

Default (Default)

Remove-EntraBetaServicePrincipalPolicy

    -Id <String>
    -PolicyId <String>
    [<CommonParameters>]

Description

Delete a servicePrincipal policy. Specify the Id and PolicyId parameter to remove a specific servicePrincipal policy.

Examples

Example 1: Remove a service principal policy

Connect-Entra -Scopes Policy.Read.All, Application.ReadWrite.All
$params = @{
    Id = 'bbbbbbbb-1111-1111-1111-cccccccccccc'
    PolicyId = 'ffffffff-5555-6666-7777-aaaaaaaaaaaa'
}
Remove-EntraBetaServicePrincipalPolicy @params

This command removes a specific servicePrincipal policy in Microsoft Entra ID.

Parameters

-Id

Specifies the object Id of the Service Principal.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-PolicyId

Specifies the object ID of a policy.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.