Forum Discussion
JayDee
Dec 01, 2023Copper Contributor
Shows Wrong Owner on my ExcelFiles
Hello, If I post an Excel File... since a few weeks I see the old Admin everytime as an extra owner. This Admin are deleted on our Company. And 30 days are over and he isn't listed on "Deleted...
JayDee
Dec 14, 2023Copper Contributor
sry but nothing worked.
It shows this user in every file as owner in the persnonal onedrive files of all users.
It shows this user in every file as owner in the persnonal onedrive files of all users.
NikolinoDE
Dec 14, 2023Platinum Contributor
If the old admin continues to appear as an owner in every file in the personal OneDrive files of all users, and the previously mentioned steps did not resolve the issue, you may need to consider more advanced troubleshooting steps.
Here are some additional suggestions:
1. PowerShell Script:
- If you have administrative access, you can use PowerShell to iterate through OneDrive files and update ownership. This may involve checking and modifying file ownership for each user. Below is a sample PowerShell script that can be used as a starting point. Modify it according to your needs and test it in a controlled environment before applying it broadly:
Powershell code (is untested):
# Connect to SharePoint Online
Connect-SPOService -Url https://yourorganization-admin.sharepoint.com
# Iterate through each user's OneDrive
$users = Get-Content "C:\Path\To\UserList.txt" # Provide a list of user accounts
foreach ($user in $users) {
$userOneDriveUrl = "https://yourorganization-my.sharepoint.com/personal/$user_domain_com"
$userFiles = Get-SPOSite -Identity $userOneDriveUrl
foreach ($file in $userFiles) {
# Check and modify ownership as needed
# Your logic to update ownership goes here
}
}2. SharePoint Online Management Shell:
- Explore additional SharePoint Online Management Shell cmdlets that might provide more granular control over file ownership.
3. Advanced Permissions Audit:
- Consider performing an advanced permissions audit using auditing features in SharePoint Online. This might help identify where the old admin is gaining ownership access.
4. Microsoft Support:
- If the issue persists, it might be worth reaching out to Microsoft Support. They have tools and resources to investigate and resolve complex issues related to SharePoint Online and OneDrive.
Before implementing any scripts or making changes, ensure you have a backup and test in a controlled environment to avoid unintended consequences. The text, steps and code was created with the help of AI.