Forum Discussion
blue-man
Nov 13, 2019Iron Contributor
Applying OneDrive Retention Policy to a Group
I know you can create a One Drive retention policy against individual personal URLs, but I was wondering if there is anyway to automate this via an AD group or a specific AD attribute. Basically ...
- Nov 13, 2019
Sadly, even after years of us asking for simplifying the experience when it comes to stamping retention on ODFB sites, the controls in the portal still only accept URLs. But, you can do it easily via PowerShell.
VasilMichev
Nov 13, 2019MVP
Sadly, even after years of us asking for simplifying the experience when it comes to stamping retention on ODFB sites, the controls in the portal still only accept URLs. But, you can do it easily via PowerShell.
- blue-manNov 13, 2019Iron ContributorOk so could we query the users URL by a certain AD attribute, for example department attribute? Do you have any examples of how to do this via powershell please?
- VasilMichevNov 14, 2019MVP
There are multiple samples online that you can use to enumerate ODFB drives, or filter them by some criteria. The simplest ones are listed here: https://docs.microsoft.com/en-us/onedrive/list-onedrive-urls
If you need a more robust method, you can use CSOM or the Graph API
- blue-manNov 14, 2019Iron ContributorThanks I found some examples last night that use CSOM.