Skip to content

Add Get, Grant, Set and Revoke cmdlets for EntraID app list item permissions#5294

Open
fabianhutzli wants to merge 1 commit intopnp:devfrom
fabianhutzli:feat/listitemsselected
Open

Add Get, Grant, Set and Revoke cmdlets for EntraID app list item permissions#5294
fabianhutzli wants to merge 1 commit intopnp:devfrom
fabianhutzli:feat/listitemsselected

Conversation

@fabianhutzli
Copy link
Copy Markdown

Type

  • Bug Fix
  • New Feature
  • Sample

Summary

Adds four new cmdlets that manage app-only permissions on individual list items, enabling the use of the ListItems.SelectedOperations.Selected Entra ID app permission scoped to a single item.

New cmdlets

  • Get-PnPEntraIDAppListItemPermission – returns all or filtered item permissions (by PermissionId or AppIdentity)
  • Grant-PnPEntraIDAppListItemPermission – grants a new permission for an Entra ID app registration on a list item
  • Set-PnPEntraIDAppListItemPermission – updates the role of an existing list item permission
  • Revoke-PnPEntraIDAppListItemPermission – removes a list item permission (with confirmation prompt / -Force)

Implementation notes

  • Uses Microsoft Graph beta API (/sites/{siteId}/lists/{listId}/items/{itemId}/permissions)
  • The -ListItem parameter accepts the integer item ID (use Get-PnPListItem to resolve it)
  • Lists can be identified by GUID or display name
  • Permission roles are Read, Write, Owner
  • App display names are enriched via a best-effort GET /v1.0/servicePrincipals lookup
  • Documentation included
  • Developed with AI assistance
  • Tested

…issions

Implements ListItems.SelectedOperations.Selected support via the Microsoft
Graph beta API. The -ListItem parameter accepts the integer item ID only.
Lists can be addressed by GUID or display name. Permission roles use the
correct list-level values (Read, Write, Owner). Display names are enriched
via service principal lookup since the Graph beta API omits them on GET
responses. Documentation included.
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.

1 participant