Forum Discussion
Bhavpreet Bains
Oct 09, 2018Iron Contributor
OneDrive list of admin
Hello, We have a user who was accidentally added as site collection admin to various OneDrive accounts. Is it possible to pull a list of all site collection admin for all OneDrive accounts? I...
VasilMichev
Oct 09, 2018MVP
One way to do this is to get the Audit log events corresponding to the "add site collection admin" activity: https://docs.microsoft.com/en-us/office365/securitycompliance/search-the-audit-log-in-security-and-compliance#site-administration-activities
Bhavpreet Bains
Oct 09, 2018Iron Contributor
is there a script or cmdlet that I can use?
- VasilMichevOct 10, 2018MVP
Yes, you can use the Search-UnifiedAuditLog cmdlet: https://docs.microsoft.com/en-us/powershell/module/exchange/policy-and-compliance-audit/search-unifiedauditlog?view=exchange-ps
- Joe JamesOct 09, 2018Copper Contributor
Do you have access to tool like ShareGate - if you have you can easily remove the user from all sites or list of sites. If you don't have you could easily script it out.