The script updates the data of a Microsoft 365 tenant registered in Adaxes. The script can be executed in a custom command, business rule or scheduled task configured for any type of object (e.g. User, Group).
In the script, the $tenantName variable specifies the name of the Microsoft 365 tenant as it is specified in Adaxes.
PowerShell
$tenantName = "My tenant" # TODO: modify me
# Bind to the 'Microsoft 365' container
$configurationContainerPath = $Context.GetWellKnownContainerPath("CloudServicesO365")
$configurationContainer = $Context.BindToObject($configurationContainerPath)
# Update tenant data
$tenant = $configurationContainer.GetObject("adm-O365Tenant", "CN=$tenantName")
$tenant.ReloadData()