We use cookies to improve your experience.
By your continued use of this site you accept such use.
For more details please see our privacy policy and cookies policy.

Script Repository

Update Microsoft 365 tenant data

December 07, 2021 Views: 494

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.

Edit Remove
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()
Comments 0
Leave a comment
Loading...

Got questions?

Support Questions & Answers