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

New-M365DSCReportFromConfiguration: JSON output report is truncated (specify Depth for ConvertTo-Json) #2891

Closed
unusedcow opened this issue Feb 10, 2023 · 0 comments · Fixed by #2901 or #2906
Labels
Bug Something isn't working Core Engine

Comments

@unusedcow
Copy link

Details of the scenario you tried and the problem that is occurring

The New-M365DSCReportFromConfiguration -Type JSON command outputs a .json file with a Depth of 2 (default for ConvertTo-Json).
Any nested objects beyond that level are lost.

Example output of an AADApplication resource with nested Permissions object (MSFT_AADApplicationPermission) being truncated:

{
    "ResourceName": "AADApplication",
    <...>
    "Owners": [
      "example.user@$OrganizationName"
    ],
    "Permissions": [
      "System.Collections.Specialized.OrderedDictionary"
    ],
    <...>
}

Verbose logs showing the problem

N/A

Suggested solution to the issue

For consistency, recommend adding the ConvertTo-Json -Depth 25 parameter in the New-M365DSCConfigurationToJSON function.
See line 165 in M365DSCReport.psm1.

In function New-M365DSCDeltaReport, the Depth is already specified as 25.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

N/A

The operating system the target node is running

N/A

Version of the DSC module that was used ('dev' if using current dev branch)

Release 1.23.208.1

@andikrueger andikrueger added Bug Something isn't working Core Engine labels Feb 11, 2023
NikCharlebois added a commit to NikCharlebois/Microsoft365DSC that referenced this issue Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Core Engine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants