Skip to content

Issue with Graph SDK 2.27.0 - Get-MgBetaDeviceManagementDeviceConfiguration fails #6055

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

Open
FabienTschanz opened this issue Apr 25, 2025 · 5 comments

Comments

@FabienTschanz
Copy link
Collaborator

Description of the issue

With the PowerShell Graph SDK 2.27.0, the cmdlet Get-MgBetaDeviceManagementDeviceConfiguration fails during execution if the -DeviceConfigurationId parameter is specified. The corresponding message is that the parameter set cannot be resolved.

I reported this issue on the SDK repository at microsoftgraph/msgraph-sdk-powershell#3295. Suggesting to revert back to 2.26.1 until a newer version is available that contains fix for it. Otherwise, we'd need to update ~30 resources which specify the combination of the cmdlet with the parameter to also include an additional parameter, so that the parameter set can successfully be resolved.

Tagging @ykuijs @NikCharlebois for visibility. Please advise on what to do next.

Microsoft 365 DSC Version

V1.25.423.1

Which workloads are affected

Intune

The DSC configuration

None.

Verbose logs showing the problem

PS C:\Users\U116139> Get-MgBetaDeviceManagementDeviceConfiguration -DeviceConfigurationId id -debug
Get-MgBetaDeviceManagementDeviceConfiguration : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1
+ Get-MgBetaDeviceManagementDeviceConfiguration -DeviceConfigurationId  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-MgBetaDevic...ceConfiguration], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameterSet,Get-MgBetaDeviceManagementDeviceConfiguration

Environment Information + PowerShell Version

OsName               : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 26100.1.amd64fre.ge_release.240331-1435
OsLanguage           : en-US
OsMuiLanguages       : {en-US, de-DE, en-GB}

--------------------------------------------------

Name                           Value
----                           -----
PSVersion                      5.1.26100.3624
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.26100.3624
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@NikCharlebois
Copy link
Collaborator

Unfortunately there are too many bugs in 2.26.1 for us to roll back to it. I will try and follow-up with the Graph team. Are you aware of other cmdlets that fail with 2.27.0?

@FabienTschanz
Copy link
Collaborator Author

@NikCharlebois One that for sure was failing is New-MgUser, see #6053. But I just retested and it seems like it's all good now... Must have been an API bug then, can't reproduce it. I'm not aware of other issues at the moment.

@vaishnavi-cdf
Copy link

With great enthusiasm, contributing to fix the parameter binding issue reported by @FabienTschanz and supported by @NikCharlebois.
with learning, growing, and adding value through this contribution.
Grateful for the opportunity to contribute and be part of this community.

@FabienTschanz
Copy link
Collaborator Author

FabienTschanz commented Apr 28, 2025

@NikCharlebois The cmdlet New-MgUser fails if run with the LCM. It works in ever other context, except for if the LCM runs it. No idea why, the parameters are correct, the input as well... I traced it with Enable-DscDebug but didn't find an issue.

Edit: Finally, something. It is indeed the case that New-MgUser drops the reference to the specified password when supplied in the LCM configuration. No idea why.

What the cmdlet sends to Graph:
Image

What the content should actually be:
Image

Edit 2: Also happens with using New-MgBetaUser. Both affected by that issue.

@FabienTschanz
Copy link
Collaborator Author

@NikCharlebois The New-MgUser issue is fixed with 2.28.0, but the Get-MgBetaDeviceManagementDeviceConfiguration command isn't. Can you give the Graph SDK team a heads up? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants