Skip to content

Update-MgIdentityConditionalAccessPolicy "1054: Invalid servicePrincipal value: ." #2568

Open
@ztrhgf

Description

@ztrhgf

Describe the bug
When I try to remove all existing service principal IDs in selected conditional policy condition by defining IncludeServicePrincipals = '', it ends with an error.
image
image

I've tried to use:
IncludeServicePrincipals = $null
IncludeServicePrincipals = @()

but both tries ended with empty body a.k.a. nothing happened.

How am I suppose to select NONE then?
image

To Reproduce
Steps to reproduce the behavior:
$params = @{
Conditions = @{
ClientApplications = @{
IncludeServicePrincipals = ''
}
}
}

Update-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId -Conditions $params.Conditions -debug

Expected behavior
Existing service principals defined in such conditional policy should be remove.

Debug Output

Run the problematic command with -Debug and paste the resulting debug stream below.
⚠ ATTENTION: Be sure to remove any sensitive information that may be in the logs.

Module Version

Please run Get-Module Microsoft.Graph* after cmdlet execution and paste the output below.
If a module cannot be installed or imported, please run Get-Module -ListAvailable and paste the output.

Environment Data

Please run $PSVersionTable and paste the output below. If running the Docker container image, indicate the tag of the image used and the version of Docker engine.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions