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

Fixed Get-PnPAzureADAppSitePermission, Grant-PnPAzureADAppSitePermission and Revoke-PnPAzureADAppSitePermission cmdlets throwing an error when the site URL is not specified #4421

Merged

Conversation

KoenZomers
Copy link
Collaborator

@KoenZomers KoenZomers commented Oct 11, 2024

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

N/A

What is in this Pull Request ?

Fixed Get-PnPAzureADAppSitePermission, Grant-PnPAzureADAppSitePermission and Revoke-PnPAzureADAppSitePermission cmdlets throwing an error when the site URL is not specified and the app registration used only having Graph permissions. This error occurred as it used the SharePoint API to get the current site Id if no site was provided. This would require SharePoint permissions as well. By rewriting it to use Graph to get the site Id, it only needs Graph permissions, which it needed already anyway to work with the sitepermissions, which is more secure.

@gautamdsheth gautamdsheth merged commit 5724447 into pnp:dev Oct 11, 2024
2 checks passed
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.

2 participants