PowerShell – nullify extension attributes for all users in AAD using Graph API
Extensions attributes in AAD are a great way to store any auxiliary information that does not belong in any other user properties. The only sad part, it's only 15 of them and they are text fields. If you ever need to clear some or all of them, the script below will be a great help! Benefits of the script: makes changes in batches - only takes seconds to run; dry or wet run depending on the switch (see the important note below). This script uses an App-only access rather than Delegated access unlike my other script ( https://365basics.com/powershell-find-and-update-a-string-value-within-all-dynamic-group-membership-rules/ ). If you would like to learn more - https://learn.microsoft.com/en-us/graph/auth/auth-concepts/ Important! This line (#116) of code is responsible for either dry or wet run of the script. I left it commented on purpose and by default. # $UserAdjustments = Invoke-RestMethod @Parameters Technically, you can adjust this script to clear and/or populate any user attributes. #…