Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null valued properties should be serialized in when using cmdlets #3008

Open
gavinbarron opened this issue Oct 23, 2024 · 0 comments
Open

null valued properties should be serialized in when using cmdlets #3008

gavinbarron opened this issue Oct 23, 2024 · 0 comments
Labels

Comments

@gavinbarron
Copy link
Member

Describe the bug

A customer is trying to clear the Devices Conditions in a Conditional Access Policy and cannot using Update-MgIdentityConditionalAccessPolicy

Expected behavior

We can clear sections of a Conditional Access Policy using Update-MgIdentityConditionalAccessPolicy

When running the reproduction code we should see a request body with a null valued Devices property, e.g.:

{
  "Conditions": {
    "Devices": null
  }
}

How to reproduce

Run the following commands with fiddler set up and intercepting requests to Microsoft Graph

Connect-MgGraph
$policyId = "POLICYID"

$params = @{
  conditions = @{
   devices = $null
  }
}

Update-MgIdentityConditionalAccessPolicy -ConditionalAccessPolicyId $policyId -BodyParameter $params

You will see that the body of the request sent over the wire contains and empty object {}

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

use Invoke-GraphRequest

Debug output

not provided in IcM: https://portal.microsofticm.com/imp/v5/incidents/details/557480666

Configuration

Not provided

Other information

No response

@gavinbarron gavinbarron added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Oct 23, 2024
@timayabi2020 timayabi2020 added AutoREST-dependency and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants