powershell
powershell copied to clipboard
Updates `Get-PnPAvailableSensitivityLabel` to use new endpoint
Type
- [ ] Bug Fix
- [ ] New Feature
- [ ] Sample
- [x] Enhancement
Related Issues?
Mentioned in #2233
What is in this Pull Request ?
The current endpoint to list sensitivity labels is marked deprecated (they will break next year). Replaced the old endpoints with the new ones. Source: https://docs.microsoft.com/en-us/graph/api/informationprotectionpolicy-list-labels?view=graph-rest-beta&tabs=http
Comments
In order for this endpoint to work, delegated Graph permissions of type InformationProtectionPolicy.Read are needed. These permissions should be added to the PnP app registration.