-
Notifications
You must be signed in to change notification settings - Fork 347
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
New cmdlet to unlock list item #4457
base: dev
Are you sure you want to change the base?
Conversation
hey @reshmee011 , instead of this CSOM based API request , let's use the graph based one: Can you modify the PR to do that ? |
@gautamdsheth : Sure I can do that, I will make the changes soon. |
@gautamdsheth : Is there any existing function to retrieve the driveid of the list or library from Graph? |
Hi @reshmee011 , we use PnP Core for this. Check this :
Maybe we can use the VroomDriveId I think. Also, I think the value is same as list GUID value AFAIK, need to check , so list.ID or list.GUID might work |
@gautamdsheth : Thanks for the guidance. I have not tested it yet, will |
@gautamdsheth : I have used the REST API endpoint /_api/SP.CompliancePolicy.SPPolicyStoreProxy.UnlockRecordItem() which works for both a file and list item. The Graph endpoint works against a driveitem which from my understanding is applicable only to a file. I bet another cmdlet Unlock-PnPFile would work for the Graph endpoint https://learn.microsoft.com/en-us/graph/api/driveitem-lockorunlockrecord?view=graph-rest-1.0&tabs=http |
Hmm, need to check this a bit about how to fetch driveId via PnP Core. Will get back to you asap. |
Type
What is in this Pull Request ?
Files related to new cmdlet to unlock a list item
-src\Commands\Lists\UnlockListItemRecord.cs