-
Notifications
You must be signed in to change notification settings - Fork 359
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
[ENHANCEMENT] Deprecate -BlockEdit and -BlockDeletion parameters on Set-PnPLabel #2932
Comments
Because this is a breaking change, is this something we should add to v2? |
Hmm, if its disabled by CSOM/REST , maybe we can mark it as obsolete and point them to the correct cmdlet ? cc @KoenZomers |
Hi @gautamdsheth, The commandlet should not be disabled itself. You can still set default retention labels on lists. So these parameters are the only things that need to be deprecated. |
Ahh ok, lets deprecate them then. Would you like to submit a PR for that ? |
You can assign me |
Do we have any purview related cmdlet for this in PnP PowerShell ? Maybe we can guide users to that ? |
I haven't found commandlets to manage Purview retention labels in PnP PowerShell. (We do have them in the CLI 😏) |
Correct, we don't have cmdlets yet to add/modify/remove Purview labels. I would very much welcome a PR on that if you have time @martinlingstuyl. |
That's okay, I've worked with it a lot so that should not be hard. I'll add it to my backlog. 🤙 |
No promises on when though.. |
no worries @martinlingstuyl , thank you so much already for all your help 😊🙏 |
@martinlingstuyl - what's the API that you use in the CLI for adding/modifying/remove Purview labels ? I might try to take a stab at it :) |
we use the Graph API for managing the labels. Feel free to look around in our codebase 😇 |
Using the commandlet Set-PnPLabel you can apply a default retention label to lists and libraries. While doing that you can use the
-BlockEdit
and-BlockDeletion
parameters to configure label settings.However, this has been a concern for some time (because these settings allow you to override the retention label settings in Microsoft Purview) That's the reason they have been disabled in the CSOM and REST API's. Using them is ignored by Microsoft, Microsoft will simply look up the correct values for both properties and use them in the label application.
You can test this by applying a record retention label as a default to a list or libary and specify $false as a value for BlockEdit and BlockDelete. (A record-type label should have the value
true
on both these parameters)After applying the label you can retrieve the applied label settings. You'll see your falsy values have been ignored.
These properties should therefore be deprecated and removed from the codebase.
The text was updated successfully, but these errors were encountered: