microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Remove-MgDriveRootPermission accepts the command but does not remove the permission
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Hi,
I was asked to create an automation that would remove any admin accounts that were given permission to a user's onedrive on a daily basis. We are using Azure Automation to accomplish this.
When using the cmdlet get-mgdriverootpermission, we are able to see the permissions that have been applied to a user's OneDrive. We then use the following to remove the permission:
Remove-MgDriveRootPermission -driveid $userdrive.id -permissionid $permission.id
The $userdrive variable is the drive ID found when using get-mguserdrive.
The $permission.id is the ID of the permission found when using get-mgdriverootpermission.
The cmd completes with no errors however when we look at the permissions, the permission still exists....
We are using the 1.27.0 version of the cmdlets as our current Azure Automation runbooks are coded using this version and we are not ready to recode everything to fit to the V2 versions of the cmdlets.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.