Get-MgBetaDeviceManagementDeviceConfiguration - Wrong cmdlet definition #3295
Labels
status:waiting-for-triage
An issue that is yet to be reviewed or assigned
type:bug
A broken experience
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
For the cmdlet
Get-MgBetaDeviceManagementDeviceConfiguration
, if the parameterDeviceConfigurationId
is present with an id, it also requires that the parameterExpandProperty
is present. This was not the case with 2.26.1 and breaks every single script that fetches a single policy by its id and does not specify that additional parameter, although the parameter itself is not necessary for a correct API call.Expected behavior
Fetching the policy with a specific id returns the policy and does not throw an error.
How to reproduce
Get-MgBetaDeviceManagementDeviceConfiguration -DeviceConfigurationId id
Parameter set cannot be resolved using the specified named parameters
SDK Version
2.27.0
Latest version known to work for scenario above?
2.26.1
Known Workarounds
Downgrade to 2.26.1
Debug output
Click to expand log
Configuration
Other information
The issue lies in the definition of the cmdlet. Previously, the parameter definition looked like the following:
With 2.27.0, it looks like the following:
There are more parameter sets available per parameter, meaning that if only one parameter is specified, the parameter set cannot be resolved because multiple parameter sets could be assigned. Once an additional parameter is specified and the parameter set can be determined, it works.
The text was updated successfully, but these errors were encountered: