-
Notifications
You must be signed in to change notification settings - Fork 491
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
Graph beta modules also return a ResponseHeaders object which is currently not handled correctly in Export-TargetResource #4341
Comments
The latest Graph releases shipped have been very very buggy, 2.13.0 had a major problem and instantly people started complaining on that same Friday 2.13.1 was released but still had this issue you reported which already bite me and had to change some code around to cope with it. @andikrueger @NikCharlebois Would it be possible to not merge the Graph version right just upon their release and instead run the integration tests first to ensure everything still works and if it does then merge it? In the past their releases were robust but they seem to have lost some quality over time and I'd recommend some prior testing before jumping ship to their latest version. |
Yes, we are on it. The challenge is that not all cmdlets seem to be returning the Headers. We've identify a few around AADAuthenticationPolicyMethods and Intune, but others remained unchanged. We are following up with the Graph team, and yes, we will need to review how we update to the latest versions in our releases to make the process more robust when we depend on other modules. |
Maybe we can takle this with #3458 and implement an extended check for all dependencies. |
As mentioned in my PR to fix something else, I found a problem caused by Graph where I can't export these resources because they have a condition checking if $getValue is an array, coincidentally these are the only resources in M365DSC that have this specific condition, but I bet many more will have something like $getValue.Count -eq 1 which also fails. MSFT_IntuneDeviceEnrollmentStatusPageWindows10/MSFT_IntuneDeviceEnrollmentStatusPageWindows10.psm1:152: if($getValue -is [Array]) |
Graph SDK v2.14.1 appears to have fixed the issue. It was introduced in 2.13.1 and made even worse in 2.14.0 |
There will be an intermediate release #4348 |
Description of the issue
Something changed in Microsoft Graph beta version 2.13.2 which causes the Get-* cmdlets to return a ResponseHeaders object. Example with Graph version 2.13.2:
Example with version 2.12.0:
The extra returned object is not handled by export-targetresource and makes it return an error for every single object exported. See the "verbose Logs" below, All these Authentication Method policies are single object, but Microsoft365DSC thinks there are two because of the extra returned object by the Graph SDK. I think the dependency should be reverted to 2.12.0
Microsoft 365 DSC Version
1.24.214.2
Which workloads are affected
Azure Active Directory, other
The DSC configuration
Just export any Authentication Policy method (AADAuthenticationMethodPolicy* resources)
Verbose logs showing the problem
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: