Disable Azure User through Microsoft Graph Powershell

Hi,

I am looking for a method to disable an Azure cloud account when a change to an on-premises user happens.

What I am thinking about is:

  1. The on-premises AD user has the cloud UPN filled in on extensionAttribute1 (John.Doe@company.onmicrosoft.com)
  2. When the on-premises user is disabled, a workflow should check the value of extensionAttribute1 and execute a Powershell script to disable the user in the Cloud.

I am not using Azure AD connect to sync users between on-premises and the cloud and the 2 identities are completely separate from each other.

Any suggestions?

Thanks.

Parents Reply
  • You need to make a Change Workflow that is configured with an OnDeprovision start condition, and contains an Update Activity that sets the edsaAzureUserAccountEnabled property of your testuser@ad.local (identified as the Workflow Target) to FALSE.

    Assumption:  You have Active Roles admin service setup to communicate with your Office 365 tenant.

Children