Compress MgCommandMetadata.json to reduce whitespace/package size for Microsoft.Graph.Authentication#3346
Merged
ramsessanchez merged 5 commits intomicrosoftgraph:devfrom Aug 15, 2025
Conversation
…th `-Compress` on `ConvertTo-Json`
…th `-Compress` on `ConvertTo-Json`
Contributor
Author
|
@ramsessanchez @timayabi2020 Can someone from your team take a look at this PR please? It's been two weeks. As it stands, we're unable to ship MSGraph into our Lambda functions because the size of the modules is over Lambda's maximum dependency size. |
Contributor
Author
|
@microsoftgraph/msgraph-powershell-team What's needed to move the needle on this PR? The changes here remove JSON space that parsers (like PowerShell's It's been over a month with no feedback on this PR or on #3345. I don't know what else I can do as an external contributor. |
Microsoft.Graph.Authentication
ramsessanchez
approved these changes
Aug 15, 2025
ramsessanchez
added a commit
that referenced
this pull request
Aug 18, 2025
* Updating examples * adding template context * removing checkout * manually update openApi docs (#3373) * update and build security module only * responseAction reMap * update security beta * update openApi docs * Updating examples (#3378) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * Compress MgCommandMetadata.json to reduce whitespace/package size for `Microsoft.Graph.Authentication` (#3346) * PostGeneration\NewCommandMetadata: Compress MgCommandMetadata.json with `-Compress` on `ConvertTo-Json` * PostGeneration\AuthModuleMetadata: Compress MgCommandMetadata.json with `-Compress` on `ConvertTo-Json` --------- Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * [v2] Weekly OpenApiDocs Refresh (#3379) * Weekly OpenApiDocs Download. * Add generated MgCommandMetadata.json. [run ci] --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * bump to 2.30.0 --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> Co-authored-by: Adrian <christiano+github@microsoft.com> Co-authored-by: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Co-authored-by: Sean Williams <72675818+sean-r-williams@users.noreply.github.com>
ramsessanchez
added a commit
that referenced
this pull request
Sep 30, 2025
* Updating examples * adding template context * removing checkout * manually update openApi docs (#3373) * update and build security module only * responseAction reMap * update security beta * update openApi docs * Updating examples (#3378) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * Compress MgCommandMetadata.json to reduce whitespace/package size for `Microsoft.Graph.Authentication` (#3346) * PostGeneration\NewCommandMetadata: Compress MgCommandMetadata.json with `-Compress` on `ConvertTo-Json` * PostGeneration\AuthModuleMetadata: Compress MgCommandMetadata.json with `-Compress` on `ConvertTo-Json` --------- Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * [v2] Weekly OpenApiDocs Refresh (#3379) * Weekly OpenApiDocs Download. * Add generated MgCommandMetadata.json. [run ci] --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * fix: include the groups on prem sync behavior in the OpenAPI spec (#3400) * update azure.identity tooling (#3403) * Updating examples (#3398) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * Update New-MgDomainFederationConfiguration.md (#3385) Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * Fix missing extensionAttributes structure in PowerShell Example 2 for Update-MgDevice.md (#3384) Example 2 is missing the actual structure or syntax for how to pass extensionAttributes. Please include a working PowerShell snippet with the correct object structure. Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * Fix: Include the users onPremSyncBehavior API in the OpenAPI spec (#3407) Co-authored-by: Darshan Maiya <Darshan.Maiya@microsoft.com> * [v2] Weekly OpenApiDocs Refresh (#3410) * Weekly OpenApiDocs Download. * Add generated MgCommandMetadata.json. [run ci] --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * revert azure identity updates (#3411) * revert azure identity updates * version 2.31.0 * Add generated MgCommandMetadata.json. [run ci] (#3412) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> Co-authored-by: Adrian <christiano+github@microsoft.com> Co-authored-by: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Co-authored-by: Sean Williams <72675818+sean-r-williams@users.noreply.github.com> Co-authored-by: Gavin Barron <gavin.barron@gmail.com> Co-authored-by: Jun Takata <36251880+juntakata@users.noreply.github.com> Co-authored-by: Konstantin Klein <84774014+KonstantinMSFT@users.noreply.github.com> Co-authored-by: Darshan Maiya <darshanmaiya@users.noreply.github.com> Co-authored-by: Darshan Maiya <Darshan.Maiya@microsoft.com>
ramsessanchez
added a commit
that referenced
this pull request
Oct 17, 2025
* Updating examples * adding template context * removing checkout * manually update openApi docs (#3373) * update and build security module only * responseAction reMap * update security beta * update openApi docs * Updating examples (#3378) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * Compress MgCommandMetadata.json to reduce whitespace/package size for `Microsoft.Graph.Authentication` (#3346) * PostGeneration\NewCommandMetadata: Compress MgCommandMetadata.json with `-Compress` on `ConvertTo-Json` * PostGeneration\AuthModuleMetadata: Compress MgCommandMetadata.json with `-Compress` on `ConvertTo-Json` --------- Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * [v2] Weekly OpenApiDocs Refresh (#3379) * Weekly OpenApiDocs Download. * Add generated MgCommandMetadata.json. [run ci] --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * fix: include the groups on prem sync behavior in the OpenAPI spec (#3400) * update azure.identity tooling (#3403) * Updating examples (#3398) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * Update New-MgDomainFederationConfiguration.md (#3385) Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * Fix missing extensionAttributes structure in PowerShell Example 2 for Update-MgDevice.md (#3384) Example 2 is missing the actual structure or syntax for how to pass extensionAttributes. Please include a working PowerShell snippet with the correct object structure. Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * Fix: Include the users onPremSyncBehavior API in the OpenAPI spec (#3407) Co-authored-by: Darshan Maiya <Darshan.Maiya@microsoft.com> * [v2] Weekly OpenApiDocs Refresh (#3410) * Weekly OpenApiDocs Download. * Add generated MgCommandMetadata.json. [run ci] --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * revert azure identity updates (#3411) * revert azure identity updates * version 2.31.0 * Add generated MgCommandMetadata.json. [run ci] (#3412) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * Updating examples (#3416) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * Update example to clarify scope of AllowedToUseSSPR parameter (#3417) Updated examples in Update-MgPolicyAuthorizationPolicy.md to clarify user roles and permissions. Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * update known working open api docs (#3424) * [v2] Weekly OpenApiDocs Refresh (#3423) * Weekly OpenApiDocs Download. * Add generated MgCommandMetadata.json. [run ci] --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> Co-authored-by: Adrian <christiano+github@microsoft.com> Co-authored-by: Sean Williams <72675818+sean-r-williams@users.noreply.github.com> Co-authored-by: Gavin Barron <gavin.barron@gmail.com> Co-authored-by: Jun Takata <36251880+juntakata@users.noreply.github.com> Co-authored-by: Konstantin Klein <84774014+KonstantinMSFT@users.noreply.github.com> Co-authored-by: Darshan Maiya <darshanmaiya@users.noreply.github.com> Co-authored-by: Darshan Maiya <Darshan.Maiya@microsoft.com> Co-authored-by: Eunice Waweru <73849846+msewaweru@users.noreply.github.com>
ramsessanchez
added a commit
that referenced
this pull request
Dec 8, 2025
* Updating examples * adding template context * removing checkout * manually update openApi docs (#3373) * update and build security module only * responseAction reMap * update security beta * update openApi docs * Updating examples (#3378) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * Compress MgCommandMetadata.json to reduce whitespace/package size for `Microsoft.Graph.Authentication` (#3346) * PostGeneration\NewCommandMetadata: Compress MgCommandMetadata.json with `-Compress` on `ConvertTo-Json` * PostGeneration\AuthModuleMetadata: Compress MgCommandMetadata.json with `-Compress` on `ConvertTo-Json` --------- Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * [v2] Weekly OpenApiDocs Refresh (#3379) * Weekly OpenApiDocs Download. * Add generated MgCommandMetadata.json. [run ci] --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * fix: include the groups on prem sync behavior in the OpenAPI spec (#3400) * update azure.identity tooling (#3403) * Updating examples (#3398) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * Update New-MgDomainFederationConfiguration.md (#3385) Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * Fix missing extensionAttributes structure in PowerShell Example 2 for Update-MgDevice.md (#3384) Example 2 is missing the actual structure or syntax for how to pass extensionAttributes. Please include a working PowerShell snippet with the correct object structure. Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * Fix: Include the users onPremSyncBehavior API in the OpenAPI spec (#3407) Co-authored-by: Darshan Maiya <Darshan.Maiya@microsoft.com> * [v2] Weekly OpenApiDocs Refresh (#3410) * Weekly OpenApiDocs Download. * Add generated MgCommandMetadata.json. [run ci] --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * revert azure identity updates (#3411) * revert azure identity updates * version 2.31.0 * Add generated MgCommandMetadata.json. [run ci] (#3412) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * Updating examples (#3416) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * Update example to clarify scope of AllowedToUseSSPR parameter (#3417) Updated examples in Update-MgPolicyAuthorizationPolicy.md to clarify user roles and permissions. Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> * update known working open api docs (#3424) * [v2] Weekly OpenApiDocs Refresh (#3423) * Weekly OpenApiDocs Download. * Add generated MgCommandMetadata.json. [run ci] --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * Add update schedule section to README Added update schedule information for the SDK. * Clarify update schedule wording in README * Adding mapping for new Migrations module (#3437) Co-authored-by: Dan Guilliams <daguilli@microsoft.com> * fix: workload module script signing in pwsh at 17:20:16 (#3443) closes #2614 #2527 #3418 adds code signing to custom scripts for Identity Management and Unprotect-SecureString * chore: updates migrations module mapping regex (#3446) Co-authored-by: Dan Guilliams <daguilli@microsoft.com> * Add generated Migrations folder (#3450) * add migrations folder * Migrations module Autorest configuration updates for Cross Tenant Migration Jobs (#3447) * Updating mapping and command names for cross tenant migration jobs * Fixing comments for Migrations module autorest config --------- Co-authored-by: Dan Guilliams <daguilli@microsoft.com> Co-authored-by: Ramses Sanchez-Hernandez <63934382+ramsessanchez@users.noreply.github.com> --------- Co-authored-by: Daniel Guilliams <272397+danguilliams@users.noreply.github.com> Co-authored-by: Dan Guilliams <daguilli@microsoft.com> * Updating examples (#3453) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * Updating examples (#3449) Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> * manually update validated openApi docs (#3455) * [v2] Weekly OpenApiDocs Refresh (#3456) * Weekly OpenApiDocs Download. * Add generated MgCommandMetadata.json. [run ci] --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> --------- Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> Co-authored-by: Adrian <christiano+github@microsoft.com> Co-authored-by: Michael Mainer <8527305+MIchaelMainer@users.noreply.github.com> Co-authored-by: Sean Williams <72675818+sean-r-williams@users.noreply.github.com> Co-authored-by: Gavin Barron <gavin.barron@gmail.com> Co-authored-by: Jun Takata <36251880+juntakata@users.noreply.github.com> Co-authored-by: Konstantin Klein <84774014+KonstantinMSFT@users.noreply.github.com> Co-authored-by: Darshan Maiya <darshanmaiya@users.noreply.github.com> Co-authored-by: Darshan Maiya <Darshan.Maiya@microsoft.com> Co-authored-by: Eunice Waweru <73849846+msewaweru@users.noreply.github.com> Co-authored-by: Luis Ramos <77297467+lramosvea@users.noreply.github.com> Co-authored-by: Daniel Guilliams <272397+danguilliams@users.noreply.github.com> Co-authored-by: Dan Guilliams <daguilli@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3345.
Changes proposed in this pull request
Adds
-CompresstoConvertTo-Jsoncalls in post-generation tools:AuthModuleMetadataNewCommandMetadataThese tools appear to operate on
MgCommandMetadata.json, which has nearly 6MB of unnecessary whitespace. About 13.9% ofMicrosoft.Graph.Authentication's unpacked size on-disk is wasted by formatting characters that JSON parsers ignore anyways.Certainly welcome to feedback on this PR - these files don't appear to be getting auto-updated by CI, and I was looking for specifically the
MgCommandMetadata.jsonfilename. I'm not sure if there are other AutoREST directives/generator tools that need updating as well.