Forum Discussion
SharePoint sites and data enterprise cost allocation
To be honest it isn't, you're tagging who owns which site when created for example and then querying the data. And displaying it in PowerBI to make it easier to see and transform the data in a form of a dashboard, you can export it to a random excel or SharePoint list etc if you also want.
>we do have ShareGate but not familiar how we would accomplish with what we typically use only for migrations
Check out reporting:
https://sharegate.com/reporting
- M365PowerApr 04, 2023Copper ContributorOk I think I understand a bit more now that you mention ShareGate reporting. Instead of trying to boil the ocean and asking Microsoft to make a change to the SharePoint Online farm column so we can track in live production or purchasing an additional Microsoft product such as Azure Purview or SharePoint Syntax; export information and maybe use the site owner as a way to assign a cost center ID to associated with but in an Excel or MS List manually tracking. Am I understanding this correctly now?
- Apr 04, 2023
Yes and no!
So Microsoft won't make that change, I know several people for large organisations that have tried and gotten denied. Azure Purview and SharePoint Syntax don't have the possibility to to get this information.
So the option is to build something yourself or buy, Luckily it's pretty simple do build.
1. If your AD is up to date and proper department and you don't have orphaned sites etc.:
So first you need a script that get's all the sites and it's get's the owner. And then you do a lookup to the owner to see the department. Here's a script I created that you can use:
# This PowerShell script will get all SharePoint Online sites, their data usage, their owner and department of the owner and export the results to a CSV file. # Load SharePoint Online Management Shell Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking # Connect to SharePoint Online Admin Center Connect-SPOService -Url https://contoso-admin.sharepoint.com # Get all site collections $Sites = Get-SPOSite -Limit All # Create an empty array to store the results $Results = @() # Loop through each site collection foreach ($Site in $Sites) { # Get the site URL, data usage and owner $SiteUrl = $Site.Url $SiteUsage = $Site.StorageUsageCurrent $SiteOwner = $Site.Owner # Get the owner's department from Azure AD $Owner = Get-AzureADUser -ObjectId $SiteOwner $OwnerDepartment = $Owner.Department # Create a custom object with the properties $Result = [PSCustomObject]@{ SiteUrl = $SiteUrl SiteUsage = $SiteUsage SiteOwner = $SiteOwner OwnerDepartment = $OwnerDepartment } # Add the object to the array $Results += $Result } # Export the array to a CSV file $Results | Export-Csv -Path "C:\Temp\Sites.csv" -NoTypeInformation
2. If the AD isn't properly (aka department isn't tagged)
Then follow my previous post. This tags the site in-case the owner quits, orphaned sites etc. (reason I wrote it first)
- M365PowerApr 04, 2023Copper ContributorThank you very much - I'll will give this a try.