Scenario
Our IT admin staff have cloud-only M365 accounts completely separate from their day-to-day on-prem accounts.
Their cloud-only UPN is stored in an extensionAttribute##.
I need a script to run during deprovisioning to check the extensionAttribute, if present, grab that cloud UPN, connect to azureAD and disable the account.
I have other workflows (scheduled) that call on O365 for exchangeonline tasks that work great. But not certain how to connect to AzureAD to disable the account.
Any help would be appreciated.
Thanks