Script Repository

Update Microsoft 365 tenant data

December 07, 2021

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
$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")

Comments ( 0 )
No results found.
Leave a comment

Related Scripts