DeletingCloudOnlyObjectNotAllowed - Azure AD

T. Kujala 8,706 Reputation points
2023-03-18T05:33:53.1033333+00:00

I can't find the object to delete.

Any tips?

Thank you. :)

User's image

User's image

I have tried the following commands.

Remove-MsolUser -ObjectId "fb2f6419-fb47-457a-b33f-f93f9373f6e1" -RemoveFromRecycleBin

Set-MsolUser -ObjectId "fb2f6419-fb47-457a-b33f-f93f9373f6e1" -ImmutableId "$null"

User's image

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,814 questions
{count} votes

Accepted answer
  1. Harpreet Singh Matharoo 7,571 Reputation points Microsoft Employee
    2023-03-20T09:09:38.68+00:00

    Hello @T. Kujala

    Thank you for reaching out. I would like to inform you below:

    • Error message DeletingCloudOnlyObjectNotAllowed or Error 114 usually occurs AD Connect is trying to export something, but it has DirSync Enabled set to "False".
    • Basically, Sync is trying to delete a 'restored' user or other object. This is usually because a user has been moved to an un-synced OU or deleted On-Prem and cloud object has been restored.
    • The easiest way to find such users would be look for accounts on Azure AD which have ImmutableID value published and DirSyncEnabled status is set to False.
    • To export list of all such objects you can use following command:
    Get-AzureADUser -All $true | Select-Object -Property UserPrincipalName,ObjectId,ImmutableId,DirSyncEnabled | Export-Csv -Path C:/Users1.Csv -NoTypeInformation
    
    • Once the file is exported you can look up the csv for users which have DirSync Enabled Status as False and still ImmutableID published.
    • Post finding the user you can set the ImmutableID value to null and perform a Delta sync to fix the issue.

    I hope this answer helps to resolve your issue.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful