Deleting Organization on SDS

Regular Visitor

Hello. I want to delete Organization(School) on SDS. (

How can I delete Organization?

Thank you.




4 Replies



I believe you must first delete any sync profiles that include the organization, at that point the organization information should disappear from SDS after a day or two.

Best Response confirmed by 수현 김 (Regular Visitor)


Yes, you can.

Take a look at Bill Sluss's SDS Scripts here:


As schools are AdministrativeUnits (AUs) in Azure AD (AAD), you must use AAD's AU commands to do the job.


This script has a perfect example, what steps are needed to gather the AUs. (I love the part, where those scripts actually check for and install if needed the required Powershell and MSOL Sign-In Assistant...)


Quick fix would be to comment the line 228 from:

Remove-MsolAdministrativeUnit -ObjectId $au.ObjectId -Force 


#Remove-MsolAdministrativeUnit -ObjectId $au.ObjectId -Force 

Just to be sure nothing can be deleted.


Now its perfectly safe to run the script in Powershell ISE, (set a breakpoint at line 227)


.\Remove-All_Schools.ps1 -RemoveSchoolAus $true 


run to the point where it will ask you about deleting the schools really, here you can answer yes (as we disabled the actual delete-functionality with the # in front of line 228), let the program run until breakpoint at line 227 and then examine the resulting csv file made. (name and path are on-screen)

It will contain the needed ObjectIDs for the school AUs.


With that info you can actually delete the AU you want like this:


Remove-MsolAdministrativeUnit -ObjectId  1dc48982-fdac-4bd5-b21a-d8997ed11111 -Force


Then check the school is deleted.


PS. Kudos to

Written by: SDS Team, and adapted by Bill Sluss







Will remove-MsolAdministrative unit also remove all data from the school ?

Well I have synced the csv sample files in my tenant and want to make some cleanup.



Jean Marie





Maybe from the School AU, yes, as it is deleted. But person objects involved will have the SDS attributes still in place, not a problem, as those will be recycled if resynced with SDS, otherwise those are somewhat deep under, not really hidden, but not advertised, and not visible to other users. 


You have to try and see...