<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Office 365 Provisioning Error "Unable to provision user to Office 365, because 'Directory Sync' value of Disabled in Azure Active Directory is unsupported"
Okta Integration Network
Overview

Office 365 provisioning flow fails with the following error visible in the Okta dashboard:

Could not create user <username>in Office 365, received error: Unable to provision user <username> to Office 365, because 'Directory Sync' value of Disabled in Azure Active Directory is unsupported. Please visit the Azure Active Directory portal and set 'Directory Sync' state to Activated and retry.

 

Applies To
  • Office 365
  • Provisioning
  • Error
Cause
This is due to Directory Sync not being enabled in Azure AD.
Solution

To enable Directory Sync in Azure AD, perform the steps mentioned in the documentation:

  1. Install v1.0 and beta Microsoft Graph PowerShell modules.

    Install-Module Microsoft.Graph -Force

    Install-Module Microsoft.Graph.Beta -AllowClobber -Force

  2. Connect with the Microsoft Hybrid Identity Administrator account.

    Connect-MgGraph -scopes "Organization.ReadWrite.All, Directory.ReadWrite.All"

  3. Verify the status of the DirSync type.

    Get-MgOrganization | Select OnPremisesSyncEnabled

  4. Store the tenant ID in a variable named organizationId.

    $organizationId = (Get-MgOrganization).Id

  5. Store the false value for the DirSyncEnabled attribute.

    $params = @{onPremisesSyncEnabled = $true}

  6. Perform the update.

    Update-MgOrganization -OrganizationId $organizationId -BodyParameter $params

  7. Verify the command.

    Get-MgOrganization | Select OnPremisesSyncEnabled

NOTE:

    • Before running any PowerShell command, please carefully review the command and the current Office 365 integration configuration. It is also recommended to review Microsoft's PowerShell documentation to understand the command functionality and proper usage.
    • Directory Sync can be enabled in AAD, but it cannot be used in conjunction with AADConnect, DirSync, and AADSync, while Okta uses User Sync or Universal Sync.
  1. Retry the failed tasks after Directory Sync is enabled in Office 365. If Microsoft reports the error, please contact Microsoft Support for further troubleshooting.


Related References

Loading
Office 365 Provisioning Error "Unable to provision user to Office 365, because 'Directory Sync' value of Disabled in Azure Active Directory is unsupported"