Powershell: how to get OneDrive online folder permissions

Ale Madama 261 Reputation points
2023-03-02T16:21:53.79+00:00

Hi all,

I have some users. One of them, userA, shares some OneDrive folders with other users.

  • folder: "userA/first/second"                            full control (edit) granted to: userB, userC
  • folder: "userA/first"                            readonly granted to: userB, userC userD - full control (edit) granted to: userB
  • folder: "userA/first/second/third"        readonly granted to: userE
  • folder: "userA/fourth/fifth"                 full control (edit) granted to: userE, userC basically, lots of folders (and their subfolders) owned by userA, shared with the other users, with different permissions.

I'm able to list all the folders/subfolders within a root online, but I don't know how to get the list of users having permissions on them.

thanks!

OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
165 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
351 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 15,016 Reputation points
    2023-03-03T16:32:52.92+00:00

    Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query.

    You can simply use the command Get-SPOFileFolderPermissions cmdlet

    If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.

    1 person found this answer helpful.
    No comments