0

How can I list or export all profiles marked as "-DELETED-guid" in Profile manager (ProfMngr.aspx) in SharePoint Online?

In SP On-Premise, you could access database, but it is impossible in online. Is there an API call or other technique that can achieve this?

2 Answers 2

0

To make it, you can try PowerShell, for your reference: https://www.sharepointdiary.com/2017/08/sharepoint-online-export-user-profile-properties-to-csv-using-powershell.html

0

You can do it with CSOM as Amy posted, but the easiest way is probably with PnP:

Connect-PnPOnline -Url "https://yourtenant-admin.sharepoint.com" -Interactive

$profiles = Get-PnPUserProfileProperty -Key "AccountName"

$deletedProfiles = $profiles | Where-Object { $_.AccountName -like "*-DELETED-*" }

$deletedProfiles | Export-Csv -Path "C:\deleted_profiles.csv" -NoTypeInformation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.