Skip to content

docs: add more ARM samples for JSON output and --initialPermissions flag#251

Open
bgdnext64 wants to merge 3 commits into
mainfrom
bgdnext64/86-add-more-arm-samples
Open

docs: add more ARM samples for JSON output and --initialPermissions flag#251
bgdnext64 wants to merge 3 commits into
mainfrom
bgdnext64/86-add-more-arm-samples

Conversation

@bgdnext64

Copy link
Copy Markdown
Collaborator
  • Add ARM JSON output example to installation-and-quickstart.md
  • Add ARM --initialPermissions examples (comma-separated and @file.json) to installation-and-quickstart.md
  • Add ARM --initialPermissions examples to commandline-flags-and-env-variables.md
  • Fix --outputFormat json (non-existent flag) to --jsonOutput in display-options.MD
  • Fix JSON output sample to match actual output format (flat map of scope to permissions)
  • Add arm-initial-permissions.json sample file

@bgdnext64 bgdnext64 requested a review from a team as a code owner April 9, 2026 14:27
@bgdnext64 bgdnext64 linked an issue Apr 9, 2026 that may be closed by this pull request
@bgdnext64 bgdnext64 requested a review from Copilot April 10, 2026 16:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates MPF documentation to better cover ARM JSON output and the --initialPermissions flag, including correcting the documented JSON flag name and output shape, and adding a reusable sample permissions file.

Changes:

  • Add new ARM quickstart examples for --jsonOutput and --initialPermissions (comma-separated and @file.json) usage.
  • Fix docs to use --jsonOutput (instead of the non-existent --outputFormat json) and update JSON output examples to the flat scope→permissions map format.
  • Add a sample arm-initial-permissions.json template file.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
samples/templates/arm-initial-permissions.json Adds a sample JSON file for seeding initial permissions via --initialPermissions @file.
go.mod Bumps the Go version directive.
docs/installation-and-quickstart.md Adds ARM JSON output and --initialPermissions examples to the quickstart.
docs/display-options.MD Fixes the JSON output flag name and updates the ARM JSON output example format.
docs/commandline-flags-and-env-variables.md Adds ARM --initialPermissions examples (comma-separated and JSON file).

Comment thread go.mod Outdated
Comment thread docs/installation-and-quickstart.md Outdated
$env:MPF_SPOBJECTID = "YOUR_SP_OBJECT_ID"

.\azmpf.exe arm --templateFilePath .\samples\templates\aks-private-subnet.json --parametersFilePath .\samples\templates\aks-private-subnet-parameters.json `
--initialPermissions @arm-initial-permissions.json `

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In PowerShell, an unquoted argument starting with @ is parsed as splatting/hashtable syntax and will fail here. Quote the value so it’s passed through to the CLI (e.g., use a quoted string that starts with @...).

Suggested change
--initialPermissions @arm-initial-permissions.json `
--initialPermissions "@arm-initial-permissions.json" `

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I quoted the value in the PowerShell example so it now reads --initialPermissions "@arm-initial-permissions.json" and gets passed straight through to the CLI instead of being treated as splatting.

$env:MPF_SPOBJECTID = "YOUR_SP_OBJECT_ID"

.\azmpf.exe arm `
--initialPermissions @arm-initial-permissions.json `

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In PowerShell, --initialPermissions @arm-initial-permissions.json will be parsed as splatting syntax rather than a literal argument. Quote the @... value so the executable receives it as a string path.

Suggested change
--initialPermissions @arm-initial-permissions.json `
--initialPermissions "@arm-initial-permissions.json" `

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Same change here, the PowerShell example now wraps the value in quotes as --initialPermissions "@arm-initial-permissions.json" so it reaches the executable as a literal string path.

Comment thread docs/display-options.MD
Comment on lines 196 to 198
### Bicep JSON Output

Similar to ARM templates, Bicep deployments can produce JSON output which shows detailed permission breakdowns. The following is a sample of JSON output:

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Bicep --jsonOutput section still contains a description later in the section referring to the old JSON structure ("permissions" / "permissionsByResourceScope"). Please update the Bicep JSON Output text so it matches the current --jsonOutput format (flat map of scope → permissions), consistent with the ARM JSON example above.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I rewrote the Bicep JSON Output section so it describes the current flat map format, where the subscription key holds the aggregate permissions and each resource scope key holds its own, matching the ARM example above. The old references to the permissions array and permissionsByResourceScope are gone.

@maniSbindra maniSbindra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

--verbose
```

### Example: ARM with JSON File Format

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be ARM with Known Permissions (JSON File format)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @bgdnext64 once this nit is addressed, we are good to go

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, I updated the heading to read "ARM with Known Permissions (JSON File format)". That nit is taken care of now, so we should be good to go. Thanks Mani.

bgdnext64 added 3 commits June 8, 2026 10:23
- Add ARM JSON output example to installation-and-quickstart.md
- Add ARM --initialPermissions examples (comma-separated and @file.json) to installation-and-quickstart.md
- Add ARM --initialPermissions examples to commandline-flags-and-env-variables.md
- Fix --outputFormat json (non-existent flag) to --jsonOutput in display-options.MD
- Fix JSON output sample to match actual output format (flat map of scope to permissions)
- Add arm-initial-permissions.json sample file
- Add language specifiers to fenced code blocks (MD040)
- Add blank line before heading (MD022)
- Rename ARM JSON heading to 'ARM with Known Permissions (JSON File format)'

- Quote @file paths in PowerShell --initialPermissions examples

- Update Bicep JSON output description to flat scope->permissions map
@bgdnext64 bgdnext64 force-pushed the bgdnext64/86-add-more-arm-samples branch from 44b9f1c to 3ee3f12 Compare June 8, 2026 16:33
@bgdnext64 bgdnext64 requested a review from maniSbindra June 8, 2026 17:54
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

Successfully merging this pull request may close these issues.

Add more ARM Samples

3 participants