Description
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.
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?
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 runGet-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.